yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #47117
[Bug 1551473] Re: duplicate rbac policy internal server error
Reviewed: https://review.openstack.org/286329
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=9712e364fc4ea81c5958d63524a528e8aff44770
Submitter: Jenkins
Branch: master
commit 9712e364fc4ea81c5958d63524a528e8aff44770
Author: Kevin Benton <kevin@xxxxxxxxxx>
Date: Mon Feb 29 15:35:45 2016 -0800
Catch DBDuplicateEntry errors in RBAC code
This catches duplicate entry errors in the RBAC code
and converts them into an an appropriate exception so
clients get an HTTP conflict instead of an internal
server error.
Change-Id: I957ade2356ae9cb5bbb7e2322b4dcb37706665cf
Closes-Bug: #1551473
** Changed in: neutron
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1551473
Title:
duplicate rbac policy internal server error
Status in neutron:
Fix Released
Bug description:
creating a duplcate RBAC policy results in an internal server error:
administrator@15:21:42:/opt/stack/neutron$ neutron rbac-create 1da63901-c3b1-4bb0-9e83-d03a8016b627 --action access_as_shared --type network --target-tenant 44
Created a new rbac_policy:
+---------------+--------------------------------------+
| Field | Value |
+---------------+--------------------------------------+
| action | access_as_shared |
| id | 1a2e3faa-9e95-4e0c-8044-5d9845aef954 |
| object_id | 1da63901-c3b1-4bb0-9e83-d03a8016b627 |
| object_type | network |
| target_tenant | 44 |
| tenant_id | ac167722a61943d792bf7dc50c01dca6 |
+---------------+--------------------------------------+
administrator@15:21:53:/opt/stack/neutron$ neutron rbac-create 1da63901-c3b1-4bb0-9e83-d03a8016b627 --action access_as_shared --type network --target-tenant 44
Request Failed: internal server error while processing your request.
LOGS:
2016-02-29 15:21:55.573 27994 ERROR neutron.api.v2.resource
DBDuplicateEntry: (pymysql.err.IntegrityError) (1062, u"Duplicate
entry 'access_as_shared-1da63901-c3b1-4bb0-9e83-d03a8016b627-44' for
key 'uniq_networkrbacs0tenant_target0object_id0action'") [SQL:
u'INSERT INTO networkrbacs (tenant_id, id, target_tenant, action,
object_id) VALUES (%(tenant_id)s, %(id)s, %(target_tenant)s,
%(action)s, %(object_id)s)'] [parameters: {'action':
u'access_as_shared', 'tenant_id': u'ac167722a61943d792bf7dc50c01dca6',
'target_tenant': u'44', 'id': 'd0176c95-981a-4a35-bc3b-407bcf2d0de8',
'object_id': u'1da63901-c3b1-4bb0-9e83-d03a8016b627'}]
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1551473/+subscriptions
References