← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1679285] Re: Create Server Snapshot returns incorrect Image Location

 

Reviewed:  https://review.openstack.org/455443
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=66b0cf333758b5793208c2a734959aa192bbc39b
Submitter: Jenkins
Branch:    master

commit 66b0cf333758b5793208c2a734959aa192bbc39b
Author: Matt Riedemann <mriedem.os@xxxxxxxxx>
Date:   Thu Apr 20 16:46:24 2017 -0400

    2.45: Remove Location header from createImage and createBackup responses
    
    This changes the response for the createImage and createBackup
    server action APIs to no longer return a Location header and instead
    returns a json dict body with the snapshot image ID. This is done
    in a new microversion.
    
    Implements blueprint remove-create-image-location-header-response
    
    Closes-Bug: #1679285
    
    Change-Id: Idc899ee76b8265b1c9e0871b6c7c277424cdd442


** Changed in: nova
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1679285

Title:
  Create Server Snapshot returns incorrect Image Location

Status in OpenStack Compute (nova):
  Fix Released

Bug description:
  The createImage action for nova returns a URL to the Image created in
  a Location header. However, it returns one constructed from the
  internal glance.api_servers config values, which in clouds that have
  an internal and a public glance api will result in internal URLs being
  returned to the end user - who likely does not have routable access,
  given that they are internal API servers.

  novaclient currently does not experience any issues since it does not
  treat the URL as a URL to be used, and instead pops the last element
  from the url, knowing it to be the image_id and it returns that to the
  user.

  Perhaps a better option would be to add a microversion and return the
  image id in a json dict response so that everyone can do what nova is
  doing without feeling dirty about it.

  ALSO:

  * We should put in a warning to the API docs that createImage is by default a cold snapshot
  * We should probably put in a note in the API docs that the Location header return value is more likely than not to be broken, and that if the cloud in question doens't have the new microversion, that the user should pop the ID off the end of the URL

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1679285/+subscriptions


References