deleting an unassigned role causes 500

Bug #1211445 reported by Dolph Mathews
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Invalid
High
Henry Nash

Bug Description

I would assume that this is directly related to bug 1210590, but I'm filing separately just in case.

request:

DELETE http://localhost:35357/v3/roles/9cf9fc40486947539a10400e638b9e65

response:

{
  "error": {
    "message": "An unexpected error prevented the server from fulfilling your request. 'unicode' object has no attribute 'items'",
    "code": 500,
    "title": "Internal Server Error"
  }
}

backtrace:

ERROR [keystone.common.wsgi] 'unicode' object has no attribute 'items'
Traceback (most recent call last):
  File "/Users/dolph/Projects/keystone/keystone/common/wsgi.py", line 240, in __call__
    result = method(context, **params)
  File "/Users/dolph/Projects/keystone/keystone/common/controller.py", line 106, in wrapper
    return f(self, context, *args, **kwargs)
  File "/Users/dolph/Projects/keystone/keystone/identity/controllers.py", line 749, in delete_role
    return self.identity_api.delete_role(role_id)
  File "/Users/dolph/Projects/keystone/keystone/identity/core.py", line 141, in delete_role
    return self.assignment_api.delete_role(role_id)
  File "/Users/dolph/Projects/keystone/keystone/common/manager.py", line 44, in _wrapper
    return f(*args, **kw)
  File "/Users/dolph/Projects/keystone/keystone/assignment/backends/sql.py", line 600, in delete_role
    project_id=metadata_ref.project_id)
  File "/Users/dolph/Projects/keystone/keystone/assignment/backends/sql.py", line 211, in delete_grant
    role_id, inherited_to_projects, metadata_ref.get('roles', []))
  File "/Users/dolph/Projects/keystone/keystone/assignment/core.py", line 244, in _remove_role_from_role_dicts
    role_set = set([frozenset(r.items()) for r in dict_list])
AttributeError: 'unicode' object has no attribute 'items'

Revision history for this message
Dolph Mathews (dolph) wrote :

Downgrading priority as I'm unable to reproduce on master (i.e. if the issue still exists - it's doesn't appear to be a critical blocker).

Changed in keystone:
importance: Critical → High
Revision history for this message
Dolph Mathews (dolph) wrote :

Not able to reproduce.

Changed in keystone:
status: Confirmed → Invalid
Dolph Mathews (dolph)
Changed in keystone:
milestone: havana-3 → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.