← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1693335] [NEW] UUID case sensitivity causing unfriendly and unexpected API errors

 

Public bug reported:

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.

** Affects: nova
     Importance: Undecided
         Status: New

-- 
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/1693335

Title:
  UUID case sensitivity causing unfriendly and unexpected API errors

Status in OpenStack Compute (nova):
  New

Bug description:
  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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1693335/+subscriptions


Follow ups