yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #26698
[Bug 1408625] [NEW] metadata server errors out with a request missing X-Instance-ID-Signature header
Public bug reported:
When metadata server (nova-api:8775 by default) gets a request without X
-Instance-ID-Signature header, the server errors out with the following
stacktrace:
2015-01-08 18:10:51.955 INFO nova.metadata.wsgi.server [-] 127.0.0.1 "GET / HTTP/1.1" status: 200 len: 215 time: 0.0011151
2015-01-08 18:10:55.354 ERROR nova.api.ec2 [-] FaultWrapper: object of type 'NoneType' has no len()
2015-01-08 18:10:55.354 TRACE nova.api.ec2 Traceback (most recent call last):
2015-01-08 18:10:55.354 TRACE nova.api.ec2 File "/opt/stack/nova/nova/api/ec2/__init__.py", line 90, in __call__
2015-01-08 18:10:55.354 TRACE nova.api.ec2 return req.get_response(self.application)
2015-01-08 18:10:55.354 TRACE nova.api.ec2 File "build/bdist.linux-x86_64/egg/webob/request.py", line 1320, in send
2015-01-08 18:10:55.354 TRACE nova.api.ec2 application, catch_exc_info=False)
2015-01-08 18:10:55.354 TRACE nova.api.ec2 File "build/bdist.linux-x86_64/egg/webob/request.py", line 1284, in call_application
2015-01-08 18:10:55.354 TRACE nova.api.ec2 app_iter = application(self.environ, start_response)
2015-01-08 18:10:55.354 TRACE nova.api.ec2 File "build/bdist.linux-x86_64/egg/webob/dec.py", line 130, in __call__
2015-01-08 18:10:55.354 TRACE nova.api.ec2 resp = self.call_func(req, *args, **self.kwargs)
2015-01-08 18:10:55.354 TRACE nova.api.ec2 File "build/bdist.linux-x86_64/egg/webob/dec.py", line 195, in call_func
2015-01-08 18:10:55.354 TRACE nova.api.ec2 return self.func(req, *args, **kwargs)
2015-01-08 18:10:55.354 TRACE nova.api.ec2 File "/opt/stack/nova/nova/api/ec2/__init__.py", line 102, in __call__
2015-01-08 18:10:55.354 TRACE nova.api.ec2 rv = req.get_response(self.application)
2015-01-08 18:10:55.354 TRACE nova.api.ec2 File "build/bdist.linux-x86_64/egg/webob/request.py", line 1320, in send
2015-01-08 18:10:55.354 TRACE nova.api.ec2 application, catch_exc_info=False)
2015-01-08 18:10:55.354 TRACE nova.api.ec2 File "build/bdist.linux-x86_64/egg/webob/request.py", line 1284, in call_application
2015-01-08 18:10:55.354 TRACE nova.api.ec2 app_iter = application(self.environ, start_response)
2015-01-08 18:10:55.354 TRACE nova.api.ec2 File "build/bdist.linux-x86_64/egg/webob/dec.py", line 130, in __call__
2015-01-08 18:10:55.354 TRACE nova.api.ec2 resp = self.call_func(req, *args, **self.kwargs)
2015-01-08 18:10:55.354 TRACE nova.api.ec2 File "build/bdist.linux-x86_64/egg/webob/dec.py", line 195, in call_func
2015-01-08 18:10:55.354 TRACE nova.api.ec2 return self.func(req, *args, **kwargs)
2015-01-08 18:10:55.354 TRACE nova.api.ec2 File "/opt/stack/nova/nova/api/metadata/handler.py", line 110, in __call__
2015-01-08 18:10:55.354 TRACE nova.api.ec2 meta_data = self._handle_instance_id_request(req)
2015-01-08 18:10:55.354 TRACE nova.api.ec2 File "/opt/stack/nova/nova/api/metadata/handler.py", line 187, in _handle_instance_id_request
2015-01-08 18:10:55.354 TRACE nova.api.ec2 if not utils.constant_time_compare(expected_signature, signature):
2015-01-08 18:10:55.354 TRACE nova.api.ec2 File "/opt/stack/nova/nova/utils.py", line 1140, in constant_time_compare
2015-01-08 18:10:55.354 TRACE nova.api.ec2 if len(first) != len(second):
2015-01-08 18:10:55.354 TRACE nova.api.ec2 TypeError: object of type 'NoneType' has no len()
2015-01-08 18:10:55.354 TRACE nova.api.ec2
It'd be safer to validate against non-existence.
** Affects: nova
Importance: Undecided
Assignee: Tomoe Sugihara (tomoe)
Status: In Progress
--
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/1408625
Title:
metadata server errors out with a request missing X-Instance-ID-
Signature header
Status in OpenStack Compute (Nova):
In Progress
Bug description:
When metadata server (nova-api:8775 by default) gets a request without
X-Instance-ID-Signature header, the server errors out with the
following stacktrace:
2015-01-08 18:10:51.955 INFO nova.metadata.wsgi.server [-] 127.0.0.1 "GET / HTTP/1.1" status: 200 len: 215 time: 0.0011151
2015-01-08 18:10:55.354 ERROR nova.api.ec2 [-] FaultWrapper: object of type 'NoneType' has no len()
2015-01-08 18:10:55.354 TRACE nova.api.ec2 Traceback (most recent call last):
2015-01-08 18:10:55.354 TRACE nova.api.ec2 File "/opt/stack/nova/nova/api/ec2/__init__.py", line 90, in __call__
2015-01-08 18:10:55.354 TRACE nova.api.ec2 return req.get_response(self.application)
2015-01-08 18:10:55.354 TRACE nova.api.ec2 File "build/bdist.linux-x86_64/egg/webob/request.py", line 1320, in send
2015-01-08 18:10:55.354 TRACE nova.api.ec2 application, catch_exc_info=False)
2015-01-08 18:10:55.354 TRACE nova.api.ec2 File "build/bdist.linux-x86_64/egg/webob/request.py", line 1284, in call_application
2015-01-08 18:10:55.354 TRACE nova.api.ec2 app_iter = application(self.environ, start_response)
2015-01-08 18:10:55.354 TRACE nova.api.ec2 File "build/bdist.linux-x86_64/egg/webob/dec.py", line 130, in __call__
2015-01-08 18:10:55.354 TRACE nova.api.ec2 resp = self.call_func(req, *args, **self.kwargs)
2015-01-08 18:10:55.354 TRACE nova.api.ec2 File "build/bdist.linux-x86_64/egg/webob/dec.py", line 195, in call_func
2015-01-08 18:10:55.354 TRACE nova.api.ec2 return self.func(req, *args, **kwargs)
2015-01-08 18:10:55.354 TRACE nova.api.ec2 File "/opt/stack/nova/nova/api/ec2/__init__.py", line 102, in __call__
2015-01-08 18:10:55.354 TRACE nova.api.ec2 rv = req.get_response(self.application)
2015-01-08 18:10:55.354 TRACE nova.api.ec2 File "build/bdist.linux-x86_64/egg/webob/request.py", line 1320, in send
2015-01-08 18:10:55.354 TRACE nova.api.ec2 application, catch_exc_info=False)
2015-01-08 18:10:55.354 TRACE nova.api.ec2 File "build/bdist.linux-x86_64/egg/webob/request.py", line 1284, in call_application
2015-01-08 18:10:55.354 TRACE nova.api.ec2 app_iter = application(self.environ, start_response)
2015-01-08 18:10:55.354 TRACE nova.api.ec2 File "build/bdist.linux-x86_64/egg/webob/dec.py", line 130, in __call__
2015-01-08 18:10:55.354 TRACE nova.api.ec2 resp = self.call_func(req, *args, **self.kwargs)
2015-01-08 18:10:55.354 TRACE nova.api.ec2 File "build/bdist.linux-x86_64/egg/webob/dec.py", line 195, in call_func
2015-01-08 18:10:55.354 TRACE nova.api.ec2 return self.func(req, *args, **kwargs)
2015-01-08 18:10:55.354 TRACE nova.api.ec2 File "/opt/stack/nova/nova/api/metadata/handler.py", line 110, in __call__
2015-01-08 18:10:55.354 TRACE nova.api.ec2 meta_data = self._handle_instance_id_request(req)
2015-01-08 18:10:55.354 TRACE nova.api.ec2 File "/opt/stack/nova/nova/api/metadata/handler.py", line 187, in _handle_instance_id_request
2015-01-08 18:10:55.354 TRACE nova.api.ec2 if not utils.constant_time_compare(expected_signature, signature):
2015-01-08 18:10:55.354 TRACE nova.api.ec2 File "/opt/stack/nova/nova/utils.py", line 1140, in constant_time_compare
2015-01-08 18:10:55.354 TRACE nova.api.ec2 if len(first) != len(second):
2015-01-08 18:10:55.354 TRACE nova.api.ec2 TypeError: object of type 'NoneType' has no len()
2015-01-08 18:10:55.354 TRACE nova.api.ec2
It'd be safer to validate against non-existence.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1408625/+subscriptions
Follow ups
References