← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1349955] [NEW] Domain operation yield "'module' object has no attribute 'KeyError'"

 

Public bug reported:

2014-07-29 10:28:09.262 23512 TRACE keystone.common.wsgi Traceback (most recent call last):
2014-07-29 10:28:09.262 23512 TRACE keystone.common.wsgi   File "/opt/stack/venvs/openstack/local/lib/python2.7/site-packages/keystone/common/wsgi.py", line 212, in __call__
2014-07-29 10:28:09.262 23512 TRACE keystone.common.wsgi     result = method(context, **params)
2014-07-29 10:28:09.262 23512 TRACE keystone.common.wsgi   File "/opt/stack/venvs/openstack/local/lib/python2.7/site-packages/keystone/common/controller.py", line 151, in inner
2014-07-29 10:28:09.262 23512 TRACE keystone.common.wsgi     return f(self, context, *args, **kwargs)
2014-07-29 10:28:09.262 23512 TRACE keystone.common.wsgi   File "/opt/stack/venvs/openstack/local/lib/python2.7/site-packages/keystone/identity/controllers.py", line 294, in create_group
2014-07-29 10:28:09.262 23512 TRACE keystone.common.wsgi     ref = self._normalize_domain_id(context, ref)
2014-07-29 10:28:09.262 23512 TRACE keystone.common.wsgi   File "/opt/stack/venvs/openstack/local/lib/python2.7/site-packages/keystone/common/controller.py", line 621, in _normalize_domain_id
2014-07-29 10:28:09.262 23512 TRACE keystone.common.wsgi     ref['domain_id'] = self._get_domain_id_from_token(context)
2014-07-29 10:28:09.262 23512 TRACE keystone.common.wsgi   File "/opt/stack/venvs/openstack/local/lib/python2.7/site-packages/keystone/common/controller.py", line 598, in _get_domain_id_from_token
2014-07-29 10:28:09.262 23512 TRACE keystone.common.wsgi     except exception.KeyError:
2014-07-29 10:28:09.262 23512 TRACE keystone.common.wsgi AttributeError: 'module' object has no attribute 'KeyError'


We should be catch 'KeyError' instead of 'exception.KeyError'

https://github.com/openstack/keystone/blob/master/keystone/common/controller.py#L598
https://github.com/openstack/keystone/blob/master/keystone/common/controller.py#L568

** Affects: keystone
     Importance: High
     Assignee: Guang Yee (guang-yee)
         Status: New

** Changed in: keystone
     Assignee: (unassigned) => Guang Yee (guang-yee)

** Changed in: keystone
   Importance: Undecided => Critical

** Changed in: keystone
   Importance: Critical => High

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Keystone.
https://bugs.launchpad.net/bugs/1349955

Title:
  Domain operation yield "'module' object has no attribute 'KeyError'"

Status in OpenStack Identity (Keystone):
  New

Bug description:
  2014-07-29 10:28:09.262 23512 TRACE keystone.common.wsgi Traceback (most recent call last):
  2014-07-29 10:28:09.262 23512 TRACE keystone.common.wsgi   File "/opt/stack/venvs/openstack/local/lib/python2.7/site-packages/keystone/common/wsgi.py", line 212, in __call__
  2014-07-29 10:28:09.262 23512 TRACE keystone.common.wsgi     result = method(context, **params)
  2014-07-29 10:28:09.262 23512 TRACE keystone.common.wsgi   File "/opt/stack/venvs/openstack/local/lib/python2.7/site-packages/keystone/common/controller.py", line 151, in inner
  2014-07-29 10:28:09.262 23512 TRACE keystone.common.wsgi     return f(self, context, *args, **kwargs)
  2014-07-29 10:28:09.262 23512 TRACE keystone.common.wsgi   File "/opt/stack/venvs/openstack/local/lib/python2.7/site-packages/keystone/identity/controllers.py", line 294, in create_group
  2014-07-29 10:28:09.262 23512 TRACE keystone.common.wsgi     ref = self._normalize_domain_id(context, ref)
  2014-07-29 10:28:09.262 23512 TRACE keystone.common.wsgi   File "/opt/stack/venvs/openstack/local/lib/python2.7/site-packages/keystone/common/controller.py", line 621, in _normalize_domain_id
  2014-07-29 10:28:09.262 23512 TRACE keystone.common.wsgi     ref['domain_id'] = self._get_domain_id_from_token(context)
  2014-07-29 10:28:09.262 23512 TRACE keystone.common.wsgi   File "/opt/stack/venvs/openstack/local/lib/python2.7/site-packages/keystone/common/controller.py", line 598, in _get_domain_id_from_token
  2014-07-29 10:28:09.262 23512 TRACE keystone.common.wsgi     except exception.KeyError:
  2014-07-29 10:28:09.262 23512 TRACE keystone.common.wsgi AttributeError: 'module' object has no attribute 'KeyError'

  
  We should be catch 'KeyError' instead of 'exception.KeyError'

  https://github.com/openstack/keystone/blob/master/keystone/common/controller.py#L598
  https://github.com/openstack/keystone/blob/master/keystone/common/controller.py#L568

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


Follow ups

References