yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #15787
[Bug 1298005] Re: API returns http url instead of https for create image
** Changed in: nova
Status: Fix Committed => Fix Released
** Changed in: nova
Milestone: None => juno-1
--
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/1298005
Title:
API returns http url instead of https for create image
Status in OpenStack Compute (Nova):
Fix Released
Bug description:
The response to image create returns a http url when it should be
https
REQ: curl -i
'https://iad.servers.api.rackspacecloud.com/v2/<tenant>/servers/<uuid>/action'
-X POST -H "X-Auth-Project-Id: <tenant>" -H "User-Agent: python-
novaclient" -H "Content-Type: application/json" -H "Accept:
application/json" -H "X-Auth-Token: <redacted>" -d '{"createImage":
{"name": "Blogtest", "metadata": {}}}'
RESP: [202] CaseInsensitiveDict({'content-length': '0', 'via': '1.1
Repose (Repose/2.12)', 'x-compute-request-id': 'req-
da7323e1-c616-4122-8615-b4fec7c302eb', 'server':
'Jetty(8.0.y.z-SNAPSHOT)', 'location':
'http://iad.servers.api.rackspacecloud.com/v2/<tenant>/images/<image-
id>', 'date': 'Tue, 31 Dec 2013 15:30:03 GMT', 'content-type':
'text/html;charset=UTF-8'})
Note the 'http://...' location in the response. This is caused by SSL termination happening before nova-api, which seems to be the recommended setup, and the way image locations are generated via the request url. Because SSL termination happens before nova-api it doesn't see an https request and therefore builds the location improperly.
Long term the proper fix is probably to generate the location based on
the service catalog returned for a user. But that gets into feature
territory. For now we should take advantage of the
'osapi_glance_link_prefix' config option which is in place for almost
precisely this purpose.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1298005/+subscriptions
References