← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1355715] [NEW] Adding a role "member" gives duplicate entry error whereas assigning role "member" to an user gives role not found error.

 

Public bug reported:

The above problem occurs if a role "Member" is present already.

logs:
openstack role add member

DEBUG: keystoneclient.session REQ: curl -i --insecure -X POST http://127.0.0.1:35357/v2.0/OS-KSADM/roles -H "User-Agent: python-keystoneclient" -H "Content-Type: application/json" -H "X-Auth-Token: 1ffd2d4d966a47ad871525b986f7171e" -d '{"role": {"name": "member"}}'
INFO: requests.packages.urllib3.connectionpool Starting new HTTP connection (1): 127.0.0.1
DEBUG: requests.packages.urllib3.connectionpool "POST /v2.0/OS-KSADM/roles HTTP/1.1" 409 120
DEBUG: keystoneclient.session RESP: [409] {'date': 'Tue, 12 Aug 2014 10:02:22 GMT', 'content-type': 'application/json', 'content-length': '120', 'vary': 'X-Auth-Token'}
RESP BODY: {"error": {"message": "Conflict occurred attempting to store role - Duplicate Entry", "code": 409, "title": "Conflict"}}

openstack role add --project agr --user aj member

DEBUG: keystoneclient.session REQ: curl -i --insecure -X GET http://127.0.0.1:35357/v2.0/OS-KSADM/roles/member -H "User-Agent: python-keystoneclient" -H "X-Auth-Token: 661cb74bee6e44ffacd084a3cc013e61"
INFO: requests.packages.urllib3.connectionpool Starting new HTTP connection (1): 127.0.0.1
DEBUG: requests.packages.urllib3.connectionpool "GET /v2.0/OS-KSADM/roles/member HTTP/1.1" 404 88
DEBUG: keystoneclient.session RESP: [404] {'date': 'Tue, 12 Aug 2014 10:03:32 GMT', 'content-type': 'application/json', 'content-length': '88', 'vary': 'X-Auth-Token'}
RESP BODY: {"error": {"message": "Could not find role: member", "code": 404, "title": "Not Found"}}

DEBUG: keystoneclient.session Request returned failure status: 404
DEBUG: keystoneclient.session REQ: curl -i --insecure -X GET http://127.0.0.1:35357/v2.0/OS-KSADM/roles -H "User-Agent: python-keystoneclient" -H "X-Auth-Token: 661cb74bee6e44ffacd084a3cc013e61"
INFO: requests.packages.urllib3.connectionpool Starting new HTTP connection (1): 127.0.0.1
DEBUG: requests.packages.urllib3.connectionpool "GET /v2.0/OS-KSADM/roles HTTP/1.1" 200 540
DEBUG: keystoneclient.session RESP: [200] {'date': 'Tue, 12 Aug 2014 10:03:32 GMT', 'content-type': 'application/json', 'content-length': '540', 'vary': 'X-Auth-Token'}
RESP BODY: {"roles": [{"id": "1c56c40303c940ef9498ca9e21706a5a", "name": "admin"}, {"id": "284081712d604180a9362221395dc18b", "name": "ResellerAdmin"}, {"id": "4f840799baa44197ab46573462770add", "name": "Member"}, {"id": "76a88370b9294b09b3ec30dbe2e6c7f0", "name": "heat_stack_owner"}, {"id": "778d9bb6a2194eb2b7ef076821168e23", "name": "service"}, {"id": "9fe2ff9ee4384b1894a90878d3e92bab", "name": "_member_"}, {"id": "a82e17d760704ac180f2ebf3bf2efc3e", "name": "anotherrole"}, {"id": "ed6031e3725f42a4a050d6987ccee574", "name": "heat_stack_user"}]}

** Affects: keystone
     Importance: Undecided
         Status: New

** Summary changed:

- Adding a role "member" gives duplicate entry error while assigning role "member" to an user gives role not found error.
+ Adding a role "member" gives duplicate entry error whereas assigning role "member" to an user gives role not found error.

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

Title:
  Adding a role "member" gives duplicate entry error whereas assigning
  role "member" to an user gives role not found error.

Status in OpenStack Identity (Keystone):
  New

Bug description:
  The above problem occurs if a role "Member" is present already.

  logs:
  openstack role add member

  DEBUG: keystoneclient.session REQ: curl -i --insecure -X POST http://127.0.0.1:35357/v2.0/OS-KSADM/roles -H "User-Agent: python-keystoneclient" -H "Content-Type: application/json" -H "X-Auth-Token: 1ffd2d4d966a47ad871525b986f7171e" -d '{"role": {"name": "member"}}'
  INFO: requests.packages.urllib3.connectionpool Starting new HTTP connection (1): 127.0.0.1
  DEBUG: requests.packages.urllib3.connectionpool "POST /v2.0/OS-KSADM/roles HTTP/1.1" 409 120
  DEBUG: keystoneclient.session RESP: [409] {'date': 'Tue, 12 Aug 2014 10:02:22 GMT', 'content-type': 'application/json', 'content-length': '120', 'vary': 'X-Auth-Token'}
  RESP BODY: {"error": {"message": "Conflict occurred attempting to store role - Duplicate Entry", "code": 409, "title": "Conflict"}}

  openstack role add --project agr --user aj member

  DEBUG: keystoneclient.session REQ: curl -i --insecure -X GET http://127.0.0.1:35357/v2.0/OS-KSADM/roles/member -H "User-Agent: python-keystoneclient" -H "X-Auth-Token: 661cb74bee6e44ffacd084a3cc013e61"
  INFO: requests.packages.urllib3.connectionpool Starting new HTTP connection (1): 127.0.0.1
  DEBUG: requests.packages.urllib3.connectionpool "GET /v2.0/OS-KSADM/roles/member HTTP/1.1" 404 88
  DEBUG: keystoneclient.session RESP: [404] {'date': 'Tue, 12 Aug 2014 10:03:32 GMT', 'content-type': 'application/json', 'content-length': '88', 'vary': 'X-Auth-Token'}
  RESP BODY: {"error": {"message": "Could not find role: member", "code": 404, "title": "Not Found"}}

  DEBUG: keystoneclient.session Request returned failure status: 404
  DEBUG: keystoneclient.session REQ: curl -i --insecure -X GET http://127.0.0.1:35357/v2.0/OS-KSADM/roles -H "User-Agent: python-keystoneclient" -H "X-Auth-Token: 661cb74bee6e44ffacd084a3cc013e61"
  INFO: requests.packages.urllib3.connectionpool Starting new HTTP connection (1): 127.0.0.1
  DEBUG: requests.packages.urllib3.connectionpool "GET /v2.0/OS-KSADM/roles HTTP/1.1" 200 540
  DEBUG: keystoneclient.session RESP: [200] {'date': 'Tue, 12 Aug 2014 10:03:32 GMT', 'content-type': 'application/json', 'content-length': '540', 'vary': 'X-Auth-Token'}
  RESP BODY: {"roles": [{"id": "1c56c40303c940ef9498ca9e21706a5a", "name": "admin"}, {"id": "284081712d604180a9362221395dc18b", "name": "ResellerAdmin"}, {"id": "4f840799baa44197ab46573462770add", "name": "Member"}, {"id": "76a88370b9294b09b3ec30dbe2e6c7f0", "name": "heat_stack_owner"}, {"id": "778d9bb6a2194eb2b7ef076821168e23", "name": "service"}, {"id": "9fe2ff9ee4384b1894a90878d3e92bab", "name": "_member_"}, {"id": "a82e17d760704ac180f2ebf3bf2efc3e", "name": "anotherrole"}, {"id": "ed6031e3725f42a4a050d6987ccee574", "name": "heat_stack_user"}]}

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


Follow ups

References