yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #04808
[Bug 1192774] Re: Fails to get metadata versions without X-Instance-Id when using quantum metadata proxy
** Changed in: nova
Status: Fix Committed => Fix Released
** Changed in: nova
Milestone: None => havana-3
--
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/1192774
Title:
Fails to get metadata versions without X-Instance-Id when using
quantum metadata proxy
Status in OpenStack Compute (Nova):
Fix Released
Bug description:
I'm not sure this is bug or not, but it looks like.
When I tries to get metadata service availability for health check with 'curl http://meta_service_ip:8775' , metadata service returns 400 error with the message that X-Instance-ID is missing. (I enabled quantum metadta proxy)
Looking at the related codes, I can see that the service returns
available versions without X-Instance-ID checking if no additional
path passed.
nova/api/metadata/handler.py
--------------------
class MetadataRequestHandler(wsgi.Application):
@webob.dec.wsgify(RequestClass=wsgi.Request)
def __call__(self, req):
if os.path.normpath("/" + req.path_info) == "/":
return(base.ec2_md_print(base.VERSIONS + ["latest"]))
--------------------
But os.path.normpath("/" + req.path_info) returns "//" not "/" if I send request "http://meta_service_ip:8775" or "http://meta_service_ip:8775/".
If I remove "/" from ("/" + req.path_info) it works fine and the service returns version correctly.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1192774/+subscriptions