*** This bug is a duplicate of bug 1537697 ***
    https://bugs.launchpad.net/bugs/1537697

** This bug is no longer a duplicate of bug 1519580
   role (Identity) can be just white character
** This bug has been marked a duplicate of bug 1537697
   The name  can be just white character except project

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Identity (keystone).
https://bugs.launchpad.net/bugs/1287471

Title:
  AttributeError is not caught when creating a role with bad request

Status in OpenStack Identity (keystone):
  In Progress

Bug description:
  When I directly use the 'curl' command to create a new role with a
  valid body, I got a server error(500).

  curl -i -X POST http://10.21.42.98:35357/v2.0/OS-KSADM/roles -H 
"User-Aghon-keystoneclient" -H "Content-Type: application/json" -H 
"X-Auth-Token: 
MIIPawYJKoZIhvcNAQcCoIIPXDCCD1gCAQExCTAHBgUrDgMCGjCCDcEGCSqGSIb3DQEHAaCCDbIEgg2ueyJhY2Nlc3MiOiB7InaT
  ......
  
KzfH3T6aXNeUzyngMfPa0iCly2o4vfnq3XkJTbBwtATRrUS3+VS102SzGJXb17Uu42cLLW2rFP7aSl0-ioRe"
 -d '{"role": ""}'

  HTTP/1.1 500 Internal Server Error
  Vary: X-Auth-Token
  Content-Type: application/json
  Content-Length: 189
  Date: Tue, 04 Mar 2014 10:59:10 GMT

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

  And the log in the keystone service.

  2014-03-04 19:59:10.973 ERROR keystone.common.wsgi [-] 'unicode' object has 
no attribute 'iteritems'
  2014-03-04 19:59:10.973 TRACE keystone.common.wsgi Traceback (most recent 
call last):
  2014-03-04 19:59:10.973 TRACE keystone.common.wsgi   File 
"/opt/stack/keystone/keystone/common/wsgi.py", line 211, in __call__
  2014-03-04 19:59:10.973 TRACE keystone.common.wsgi     result = 
method(context, **params)
  2014-03-04 19:59:10.973 TRACE keystone.common.wsgi   File 
"/opt/stack/keystone/keystone/openstack/common/versionutils.py", line 102, in 
wrapped
  2014-03-04 19:59:10.973 TRACE keystone.common.wsgi     return func(*args, 
**kwargs)
  2014-03-04 19:59:10.973 TRACE keystone.common.wsgi   File 
"/opt/stack/keystone/keystone/assignment/controllers.py", line 215, in 
create_role
  2014-03-04 19:59:10.973 TRACE keystone.common.wsgi     role = 
self._normalize_dict(role)
  2014-03-04 19:59:10.973 TRACE keystone.common.wsgi   File 
"/opt/stack/keystone/keystone/common/wsgi.py", line 254, in _normalize_dict
  2014-03-04 19:59:10.973 TRACE keystone.common.wsgi     for (k, v) in 
six.iteritems(d)])
  2014-03-04 19:59:10.973 TRACE keystone.common.wsgi   File 
"/usr/local/lib/python2.7/dist-packages/six.py", line 439, in iteritems
  2014-03-04 19:59:10.973 TRACE keystone.common.wsgi     return iter(getattr(d, 
_iteritems)(**kw))
  2014-03-04 19:59:10.973 TRACE keystone.common.wsgi AttributeError: 'unicode' 
object has no attribute 'iteritems'
  2014-03-04 19:59:10.973 TRACE keystone.common.wsgi

  The AttributeError is not caught.

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to