Bug 866681 - AttributeError: 'NoneType' object has no attribute 'get' exception in log when adding admin to tenant.
Summary: AttributeError: 'NoneType' object has no attribute 'get' exception in log whe...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-keystone
Version: 1.0 (Essex)
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
: 2.0 Folsom
Assignee: RHOS Maint
QA Contact: Yaniv Kaul
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-15 21:03 UTC by Jaroslav Henner
Modified: 2013-07-04 02:52 UTC (History)
2 users (show)

Fixed In Version: openstack-keystone-2012.2.1-1.el6ost
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-12-13 18:21:31 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1078497 0 None None None Never

Description Jaroslav Henner 2012-10-15 21:03:10 UTC
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 21:15:57 UTC
Created attachment 627708 [details]
log


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