I was seeing a user pass an uppercase UUID from their app to the Nova API's. Their calls failed with a 500 error and the following exception in the nova-api log:
017-05-24 11:20:27.176 68631 ERROR nova.api.openstack [req-674b4fd1-9a22-488e-97d2-29fca9ca3b7c 98afbc5675e059f7b1dde34c44d615712e3aafed8afcdfb5d890276ec554e737 951955d46e3a45c99e4c8649e8abe247 - - -] Caught error: 'NoneType' object has no attribute 'get'
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack Traceback (most recent call last):
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack File "/usr/lib/python2.7/site-packages/nova/api/openstack/__init__.py", line 139, in __call__
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack return req.get_response(self.application)
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack File "/usr/lib/python2.7/site-packages/webob/request.py", line 1317, in send
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack application, catch_exc_info=False)
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack File "/usr/lib/python2.7/site-packages/webob/request.py", line 1281, in call_application
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack app_iter = application(self.environ, start_response)
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack File "/usr/lib/python2.7/site-packages/webob/dec.py", line 144, in __call__
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack return resp(environ, start_response)
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack File "/usr/lib/python2.7/site-packages/webob/dec.py", line 130, in __call__
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack resp = self.call_func(req, *args, **self.kwargs)
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack File "/usr/lib/python2.7/site-packages/webob/dec.py", line 195, in call_func
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack return self.func(req, *args, **kwargs)
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack File "/usr/lib/python2.7/site-packages/keystonemiddleware/auth_token/__init__.py", line 467, in __call__
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack response = req.get_response(self._app)
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack File "/usr/lib/python2.7/site-packages/webob/request.py", line 1317, in send
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack application, catch_exc_info=False)
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack File "/usr/lib/python2.7/site-packages/webob/request.py", line 1281, in call_application
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack app_iter = application(self.environ, start_response)
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack File "/usr/lib/python2.7/site-packages/webob/dec.py", line 144, in __call__
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack return resp(environ, start_response)
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack File "/usr/lib/python2.7/site-packages/webob/dec.py", line 144, in __call__
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack return resp(environ, start_response)
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack File "/usr/lib/python2.7/site-packages/routes/middleware.py", line 131, in __call__
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack response = self.app(environ, start_response)
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack File "/usr/lib/python2.7/site-packages/webob/dec.py", line 144, in __call__
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack return resp(environ, start_response)
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack File "/usr/lib/python2.7/site-packages/webob/dec.py", line 130, in __call__
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack resp = self.call_func(req, *args, **self.kwargs)
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack File "/usr/lib/python2.7/site-packages/webob/dec.py", line 195, in call_func
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack return self.func(req, *args, **kwargs)
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack File "/usr/lib/python2.7/site-packages/nova/api/openstack/wsgi.py", line 672, in __call__
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack content_type, body, accept)
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack File "/usr/lib/python2.7/site-packages/nova/api/openstack/wsgi.py", line 756, in _process_stack
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack request, action_args)
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack File "/usr/lib/python2.7/site-packages/nova/api/openstack/wsgi.py", line 619, in post_process_extensions
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack **action_args)
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack File "/usr/lib/python2.7/site-packages/nova/api/openstack/compute/hide_server_addresses.py", line 63, in show
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack self._perhaps_hide_addresses(instance, resp.obj['server'])
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack File "/usr/lib/python2.7/site-packages/nova/api/openstack/compute/hide_server_addresses.py", line 52, in _perhaps_hide_addresses
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack if instance.get('vm_state') in self.hide_address_states:
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack AttributeError: 'NoneType' object has no attribute 'get'
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack
2017-05-24 11:20:27.177 68631 INFO nova.api.openstack [req-674b4fd1-9a22-488e-97d2-29fca9ca3b7c 98afbc5675e059f7b1dde34c44d615712e3aafed8afcdfb5d890276ec554e737 951955d46e3a45c99e4c8649e8abe247 - - -] http://api.d1cp1.ttc.openstack.target.com:8774/v2.1/951955d46e3a45c99e4c8649e8abe247/servers/5100C340-8967-4DB1-97F7-BFA1C155F250 returned with HTTP 500
Having the user pass lowercase UUID's in their app fixes the client issue, but it would be nice if the API's would sanitize UUID's or at least kick out a more friendly error.
I was seeing a user pass an uppercase UUID from their app to the Nova API's. Their calls failed with a 500 error and the following exception in the nova-api log:
017-05-24 11:20:27.176 68631 ERROR nova.api.openstack [req-674b4fd1- 9a22-488e- 97d2-29fca9ca3b 7c 98afbc5675e059f 7b1dde34c44d615 712e3aafed8afcd fb5d890276ec554 e737 951955d46e3a45c 99e4c8649e8abe2 47 - - -] Caught error: 'NoneType' object has no attribute 'get' python2. 7/site- packages/ nova/api/ openstack/ __init_ _.py", line 139, in __call__ response( self.applicatio n) python2. 7/site- packages/ webob/request. py", line 1317, in send info=False) python2. 7/site- packages/ webob/request. py", line 1281, in call_application self.environ, start_response) python2. 7/site- packages/ webob/dec. py", line 144, in __call__ python2. 7/site- packages/ webob/dec. py", line 130, in __call__ python2. 7/site- packages/ webob/dec. py", line 195, in call_func python2. 7/site- packages/ keystonemiddlew are/auth_ token/_ _init__ .py", line 467, in __call__ response( self._app) python2. 7/site- packages/ webob/request. py", line 1317, in send info=False) python2. 7/site- packages/ webob/request. py", line 1281, in call_application self.environ, start_response) python2. 7/site- packages/ webob/dec. py", line 144, in __call__ python2. 7/site- packages/ webob/dec. py", line 144, in __call__ python2. 7/site- packages/ routes/ middleware. py", line 131, in __call__ python2. 7/site- packages/ webob/dec. py", line 144, in __call__ python2. 7/site- packages/ webob/dec. py", line 130, in __call__ python2. 7/site- packages/ webob/dec. py", line 195, in call_func python2. 7/site- packages/ nova/api/ openstack/ wsgi.py" , line 672, in __call__ python2. 7/site- packages/ nova/api/ openstack/ wsgi.py" , line 756, in _process_stack python2. 7/site- packages/ nova/api/ openstack/ wsgi.py" , line 619, in post_process_ extensions python2. 7/site- packages/ nova/api/ openstack/ compute/ hide_server_ addresses. py", line 63, in show hide_addresses( instance, resp.obj['server']) python2. 7/site- packages/ nova/api/ openstack/ compute/ hide_server_ addresses. py", line 52, in _perhaps_ hide_addresses get('vm_ state') in self.hide_ address_ states: 9a22-488e- 97d2-29fca9ca3b 7c 98afbc5675e059f 7b1dde34c44d615 712e3aafed8afcd fb5d890276ec554 e737 951955d46e3a45c 99e4c8649e8abe2 47 - - -] http:// api.d1cp1. ttc.openstack. target. com:8774/ v2.1/951955d46e 3a45c99e4c8649e 8abe247/ servers/ 5100C340- 8967-4DB1- 97F7-BFA1C155F2 50 returned with HTTP 500
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack Traceback (most recent call last):
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack File "/usr/lib/
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack return req.get_
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack File "/usr/lib/
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack application, catch_exc_
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack File "/usr/lib/
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack app_iter = application(
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack File "/usr/lib/
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack return resp(environ, start_response)
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack File "/usr/lib/
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack resp = self.call_func(req, *args, **self.kwargs)
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack File "/usr/lib/
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack return self.func(req, *args, **kwargs)
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack File "/usr/lib/
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack response = req.get_
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack File "/usr/lib/
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack application, catch_exc_
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack File "/usr/lib/
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack app_iter = application(
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack File "/usr/lib/
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack return resp(environ, start_response)
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack File "/usr/lib/
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack return resp(environ, start_response)
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack File "/usr/lib/
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack response = self.app(environ, start_response)
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack File "/usr/lib/
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack return resp(environ, start_response)
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack File "/usr/lib/
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack resp = self.call_func(req, *args, **self.kwargs)
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack File "/usr/lib/
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack return self.func(req, *args, **kwargs)
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack File "/usr/lib/
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack content_type, body, accept)
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack File "/usr/lib/
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack request, action_args)
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack File "/usr/lib/
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack **action_args)
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack File "/usr/lib/
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack self._perhaps_
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack File "/usr/lib/
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack if instance.
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack AttributeError: 'NoneType' object has no attribute 'get'
2017-05-24 11:20:27.176 68631 ERROR nova.api.openstack
2017-05-24 11:20:27.177 68631 INFO nova.api.openstack [req-674b4fd1-
Having the user pass lowercase UUID's in their app fixes the client issue, but it would be nice if the API's would sanitize UUID's or at least kick out a more friendly error.