← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1679285] [NEW] Create Server Snapshot returns incorrect Image Location

 

Public bug reported:

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

** Affects: nova
     Importance: Medium
         Status: Confirmed

-- 
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):
  Confirmed

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


Follow ups