Bug 1425432 - OSP10 -> OSP11 upgrade fails neutron-db-manage upgrade heads: oslo_db.exception.DBError: (pymysql.err.InternalError) (1060, u"Duplicate column name 'tenant_id'") [SQL: u'ALTER TABLE bsn_routerrules ADD COLUMN tenant_id VARCHAR(255)']
Summary: OSP10 -> OSP11 upgrade fails neutron-db-manage upgrade heads: oslo_db.except...
Keywords:
Status: CLOSED DUPLICATE of bug 1434843
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-networking-bigswitch
Version: 11.0 (Ocata)
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ga
: 11.0 (Ocata)
Assignee: Brent Eagles
QA Contact: Amit Ugol
URL:
Whiteboard:
Depends On:
Blocks: 1428976
TreeView+ depends on / blocked
 
Reported: 2017-02-21 12:26 UTC by Marius Cornea
Modified: 2017-03-23 19:40 UTC (History)
10 users (show)

Fixed In Version: python-networking-bigswitch-10.0.1-2.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1428976 (view as bug list)
Environment:
Last Closed: 2017-03-23 19:39:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
log (5.61 KB, text/plain)
2017-02-21 12:26 UTC, Marius Cornea
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1658645 0 None None None 2017-03-03 18:08:41 UTC
OpenStack gerrit 442663 0 None MERGED Revert "Revert "OSP-6 support MLR in bsnstacklib" and all related changes" 2020-09-16 23:56:18 UTC

Description Marius Cornea 2017-02-21 12:26:05 UTC
Created attachment 1256108 [details]
log

Description of problem:

OSP10 -> OSP11 upgrade fails during neutron-db-manage  upgrade heads: oslo_db.exception.DBError: (pymysql.err.InternalError) (1060, u"Duplicate column name 'tenant_id'") [SQL: u'ALTER TABLE bsn_routerrules ADD COLUMN tenant_id VARCHAR(255)']

Version-Release number of selected component (if applicable):
python-networking-bigswitch-10.0.0-0.20170211205641.584bf2d.el7ost.noarch
openstack-neutron-bigswitch-agent-10.0.0-0.20170211205641.584bf2d.el7ost.noarch
openstack-neutron-bigswitch-lldp-10.0.0-0.20170211205641.584bf2d.el7ost.noarch


How reproducible:
100%

Steps to Reproduce:
1. Upgrade OSP10 to OSP11

Actual results:
Upgrade fails during neutron-db-manage  upgrade heads.

Expected results:

Additional info:
Attaching full trace.

Comment 1 Assaf Muller 2017-03-02 11:19:51 UTC
Looking at the u/s Launchpad it's unclear to me if the issue was resolved or not. Any ideas?

Comment 2 Marius Cornea 2017-03-02 13:59:31 UTC
(In reply to Assaf Muller from comment #1)
> Looking at the u/s Launchpad it's unclear to me if the issue was resolved or
> not. Any ideas?

FWIW the issue is still present in the latest downstream build.

Comment 3 Brent Eagles 2017-03-03 14:37:48 UTC
@Marius can you spec the version of the packages in the lastest build? I'm trying to work out if we have the u/s patch that was supposed to fix this or not.

Comment 4 Marius Cornea 2017-03-03 14:48:49 UTC
(In reply to Brent Eagles from comment #3)
> @Marius can you spec the version of the packages in the lastest build? I'm
> trying to work out if we have the u/s patch that was supposed to fix this or
> not.

openstack-neutron-bigswitch-agent-10.0.0-0.20170224232203.1f1208d.el7ost.noarch.rpm
openstack-neutron-bigswitch-lldp-10.0.0-0.20170224232203.1f1208d.el7ost.noarch.rpm
python-networking-bigswitch-10.0.0-0.20170224232203.1f1208d.el7ost.noarch.rpm

Comment 5 Brent Eagles 2017-03-03 15:38:44 UTC
Unless I'm missing something, comparing with the u/s bug referenced here with the initial comment, these look like two (or more?) different issues. The one reported u/s is to do with an args mismatch on a decorator - this one is a duplicate field issue. Which is still occurring, the reported u/s issue, the one referenced later in comment 5 in the launchpad bug, or the original one for this bug report?

Comment 6 Marius Cornea 2017-03-03 15:43:30 UTC
(In reply to Brent Eagles from comment #5)
> Unless I'm missing something, comparing with the u/s bug referenced here
> with the initial comment, these look like two (or more?) different issues.
> The one reported u/s is to do with an args mismatch on a decorator - this
> one is a duplicate field issue. Which is still occurring, the reported u/s
> issue, the one referenced later in comment 5 in the launchpad bug, or the
> original one for this bug report?

Sorry, I missed the details but it seems they are different issues. The issue that I see with the downstream testing is the one in the trace attached to this report.

Comment 7 Brent Eagles 2017-03-03 18:13:32 UTC
I've linked a more closely matched bug - same error actually. This should probably also be moved to the python-networking-bigswitch component.

Comment 8 Brent Eagles 2017-03-03 19:36:49 UTC
This seems like a bit of an oddity. It looks like at one point in time, this database change was backported "way back" in time. It broke u/s CI in newton and the patch that was added this column was reverted (although it didn't seem to be for previous releases). It might be a good idea to check the bigswitch tables prior to upgrade to see if this column actually does already exist in the database and if so, how? Is the current "HEAD" for the database properly set so the alembic check prevents a second run? I've cloned this bug to python-networking-bigswitch because they should probably jump in here and sort it out - especially if it is going to involved patches to code or packaging.

Comment 9 Brent Eagles 2017-03-03 19:37:04 UTC
This seems like a bit of an oddity. It looks like at one point in time, this database change was backported "way back" in time. It broke u/s CI in newton and the patch that was added this column was reverted (although it didn't seem to be for previous releases). It might be a good idea to check the bigswitch tables prior to upgrade to see if this column actually does already exist in the database and if so, how? Is the current "HEAD" for the database properly set so the alembic check prevents a second run? I've cloned this bug to python-networking-bigswitch because they should probably jump in here and sort it out - especially if it is going to involved patches to code or packaging.

Comment 10 Amit Ugol 2017-03-06 19:26:44 UTC
This is also happening while installing rhos11, not just upgrading from 10 to 11.

Comment 12 Assaf Muller 2017-03-23 15:38:24 UTC
Do you think we need to keep this RHBZ open with https://bugzilla.redhat.com/show_bug.cgi?id=1434843 ON_QA?

Comment 13 Brent Eagles 2017-03-23 15:47:06 UTC
No. I'll move to modified so QA can verify.

Comment 14 Nir Yechiel 2017-03-23 19:39:37 UTC

*** This bug has been marked as a duplicate of bug 1434843 ***


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