Bug 866681 - AttributeError: 'NoneType' object has no attribute 'get' exception in log when adding admin to tenant.
AttributeError: 'NoneType' object has no attribute 'get' exception in log whe...
Status: CLOSED CURRENTRELEASE
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-keystone (Show other bugs)
1.0 (Essex)
x86_64 Linux
unspecified Severity medium
: ---
: 2.0 Folsom
Assigned To: RHOS Maint
Yaniv Kaul
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-15 17:03 EDT by Jaroslav Henner
Modified: 2013-07-03 22:52 EDT (History)
2 users (show)

See Also:
Fixed In Version: openstack-keystone-2012.2.1-1.el6ost
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-13 13:21:31 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
log (4.49 KB, application/x-xz)
2012-10-15 17:15 EDT, Jaroslav Henner
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Launchpad 1078497 None None None Never

  None (edit)
Description Jaroslav Henner 2012-10-15 17:03:10 EDT
Description of problem:
When adding an admin user to some freshly created tenant using dashboard, dashboard says "Error: Unable to add user to tenant." but the user gets added. There is also traceback in logs.



Version-Release number of selected component (if applicable):
python-django-horizon-2012.1.1-3.el6.noarch
openstack-keystone-2012.1.2-4.el6.noarch

How reproducible:
always

Steps to Reproduce:
1. Have new project
2. Have admin project
3. Add user to new project, select admin role.
  
Actual results:
Error in dashboard, error in logs, user gets added


Expected results:
No problems



Additional info:
2012-10-15 20:51:49    DEBUG [keystone.policy.backends.rules] enforce admin_required: {'tenant_id': u'f2e23693cfb6487db35fed1bc06cc204', 'user_id': u'f02f4b1a8e4c444181ba9ed4b3cd3c0b', u'roles': [u'admin']}
2012-10-15 20:51:49    ERROR [root] 'NoneType' object has no attribute 'get'
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/keystone/common/wsgi.py", line 184, in __call__
    result = method(context, **params)
  File "/usr/lib/python2.6/site-packages/keystone/identity/core.py", line 528, in add_role_to_user
    self.token_api.revoke_tokens(context, user_id, tenant_id)
  File "/usr/lib/python2.6/site-packages/keystone/token/core.py", line 47, in revoke_tokens
    for token_id in self.list_tokens(context, user_id, tenant_id):
  File "/usr/lib/python2.6/site-packages/keystone/common/manager.py", line 48, in _wrapper
    return f(*args, **kw)
  File "/usr/lib/python2.6/site-packages/keystone/token/backends/kvs.py", line 63, in list_tokens
    if ref['tenant'].get('id') != tenant_id:
AttributeError: 'NoneType' object has no attribute 'get'
Comment 2 Jaroslav Henner 2012-10-15 17:15:57 EDT
Created attachment 627708 [details]
log

Note You need to log in before you can comment on or make changes to this bug.