Bug 1569605 - OSP10->11->12 undercloud upgrade fails with: ERROR keystone DbMigrationError: (pymysql.err.InternalError) (1061, u"Duplicate key name 'ix_default_project_id'") [SQL: u'CREATE INDEX ix_default_project_id ON user (default_project_id)']
Summary: OSP10->11->12 undercloud upgrade fails with: ERROR keystone DbMigrationError:...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: rhosp-director
Version: 13.0 (Queens)
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: zstream
: 12.0 (Pike)
Assignee: Harry Rybacki
QA Contact: Amit Ugol
URL:
Whiteboard:
Depends On:
Blocks: 1570943
TreeView+ depends on / blocked
 
Reported: 2018-04-19 14:49 UTC by Marius Cornea
Modified: 2018-10-16 15:34 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1570943 (view as bug list)
Environment:
Last Closed: 2018-10-16 15:34:01 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1765830 0 None None None 2018-04-23 13:43:17 UTC
OpenStack gerrit 563266 0 None None None 2018-04-23 13:23:35 UTC

Description Marius Cornea 2018-04-19 14:49:02 UTC
Description of problem:
OSP10->11->12 undercloud upgrade fails with: ERROR keystone DbMigrationError: (pymysql.err.InternalError) (1061, u"Duplicate key name 'ix_default_project_id'") [SQL: u'CREATE INDEX ix_default_project_id ON user (default_project_id)']

Version-Release number of selected component (if applicable):
openstack-keystone-12.0.0-4.el7ost.noarch

How reproducible:
100%

Steps to Reproduce:
1. Deploy OSP10 undercloud
2. Upgrade undercloud to 11
3. Upgrade undercloud to 12

Actual results:
Upgrade fails during keystone-manage  db_sync:

ERROR keystone DbMigrationError: (pymysql.err.InternalError) (1061, u"Duplicate key name 'ix_default_project_id'") [SQL: u'CREATE INDEX ix_default_project_id ON user (default_project_id)']

Expected results:

Upgrade doesn't fail

Additional info:
Attaching sosreport.

Comment 4 Ade Lee 2018-04-19 18:58:57 UTC
The issue here I think is basically that the migration script is not idempotent.
We're running into an issue where the script is being re-run as 22 - as it should be  - but failed because it is not idempotent.

It should be fixed and then backported as fixed to newton/ocata.

Comment 5 Ade Lee 2018-04-20 20:08:39 UTC
There is a patch to fix the issue upstream.  Once its merged, we'll backport to newton/ocata.

Comment 6 Ade Lee 2018-04-20 20:09:05 UTC
https://review.openstack.org/563266

Comment 7 Carlos Camacho 2018-09-07 11:21:05 UTC
Hello!

Any progress on this BZ?

Thanks.

Comment 8 Harry Rybacki 2018-10-16 15:34:01 UTC
Carlos, apologies for leaving this open. The patches backporting the migration from OSP12->11->10[1][2] were reverted after a second team review. This is no longer an issue for upgrades.

[1] - https://code.engineering.redhat.com/gerrit/#/c/129662/
[2] - https://code.engineering.redhat.com/gerrit/#/c/129658/

Closing as NOTABUG.


Note You need to log in before you can comment on or make changes to this bug.