Bug 1167528

Summary: assignment table migration fails for keystone-manage db_sync if duplicate entry exists
Product: [Community] RDO Reporter: Adam Young <ayoung>
Component: openstack-keystoneAssignee: Nathan Kinder <nkinder>
Status: CLOSED EOL QA Contact: Shai Revivo <srevivo>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: IcehouseCC: apevec, ayoung, rharwood, srevivo
Target Milestone: ---   
Target Release: Juno   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-19 15:51:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Adam Young 2014-11-25 02:27:02 UTC
Description of problem:

assignment table migration fails for keystone-manage db_sync if duplicate entry exists 


When moving from Havana to Icehouse (Keystone version 38 -> 44) and keystone-manage db_sync runs, it fails if there are duplicate project entries.

2014-11-24 23:12:58.701 9239 CRITICAL keystone [-] IntegrityError: (IntegrityError) (1062, "Duplicate entry 'UserProject-096cb95691404a959289200afa7d4b2f-c0036d48a8524cf6ba1' for key 'PRIMARY'") 'INSERT INTO assignment (type, actor_id, target_id, role_id, inherited) VALUES (%s, %s, %s, %s, %s)' ('UserProject', '096cb95691404a959289200afa7d4b2f', 'c0036d48a8524cf6ba1ed6e857649989', '9fe2ff9ee4384b1894a90878d3e92bab', False)

Comment 1 Alan Pevec 2014-11-26 17:43:18 UTC
> it fails if there are duplicate project entries

What could cause duplicates, was unique constraint missing in Havana and is it there now?

Comment 3 Adam Young 2015-07-23 17:31:44 UTC
I never got a final answer as to the cause of the problem.  Need to know if it is still a real issue, as it should not be.

The upstream changes have been collapsed, so it would be a backport only patch if required.  The original author has not resubmitted since the merge conflict.

Comment 5 Chandan Kumar 2016-05-19 15:51:33 UTC
This bug is against a Version which has reached End of Life.
If it's still present in supported release (http://releases.openstack.org), please update Version and reopen.