Bug 1412153 - OSP10 -> OSP11 upgrade fails during neutron-db-manage upgrade head
Summary: OSP10 -> OSP11 upgrade fails during neutron-db-manage upgrade head
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: rhosp-director
Version: 11.0 (Ocata)
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: Upstream M3
: 11.0 (Ocata)
Assignee: mathieu bultel
QA Contact: Marius Cornea
URL:
Whiteboard:
: 1416124 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-11 12:07 UTC by Marius Cornea
Modified: 2017-05-17 19:56 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-05-17 19:56:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 419422 0 None MERGED Fix database migration import for BASEV2 from neutron.db.model_base 2020-05-22 16:51:05 UTC
Red Hat Product Errata RHEA-2017:1245 0 normal SHIPPED_LIVE Red Hat OpenStack Platform 11.0 Bug Fix and Enhancement Advisory 2017-05-17 23:01:50 UTC

Description Marius Cornea 2017-01-11 12:07:19 UTC
Description of problem:
OSP10 -> OSP11 upgrade fails during neutron-db-manage upgrade head:

root@overcloud-serviceapi-0 heat-admin]# neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugin.ini upgrade head
INFO  [alembic.runtime.migration] Context impl MySQLImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
  Running upgrade for neutron ...
INFO  [alembic.runtime.migration] Context impl MySQLImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
  OK
Traceback (most recent call last):
  File "/bin/neutron-db-manage", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python2.7/site-packages/neutron/db/migration/cli.py", line 686, in main
    return_val |= bool(CONF.command.func(config, CONF.command.name))
  File "/usr/lib/python2.7/site-packages/neutron/db/migration/cli.py", line 205, in do_upgrade
    run_sanity_checks(config, revision)
  File "/usr/lib/python2.7/site-packages/neutron/db/migration/cli.py", line 670, in run_sanity_checks
    script_dir.run_env()
  File "/usr/lib/python2.7/site-packages/alembic/script/base.py", line 407, in run_env
    util.load_python_file(self.dir, 'env.py')
  File "/usr/lib/python2.7/site-packages/alembic/util/pyfiles.py", line 93, in load_python_file
    module = load_module_py(module_id, path)
  File "/usr/lib/python2.7/site-packages/alembic/util/compat.py", line 79, in load_module_py
    mod = imp.load_source(module_id, path, fp)
  File "/usr/lib/python2.7/site-packages/bsnstacklib/plugins/bigswitch/db/migration/alembic_migrations/env.py", line 20, in <module>
    from neutron.db import model_base
ImportError: cannot import name model_base

This is most probably related to https://review.openstack.org/#/c/409809/

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

How reproducible:
100%

Steps to Reproduce:
1. Upgrade from OSP10 to OSP11

Actual results:
Upgrade fails.

Expected results:
Upgrade succeeds.

Comment 1 Sofer Athlan-Guyot 2017-01-11 12:17:27 UTC
By the look of the review, it looks like

      - python-UcsSdk
      - python-networking-bigswitch
      - openstack-neutron-bigswitch-lldp
      - openstack-neutron-bigswitch-agent

Sould be removed during the upgrade.   Going to check, but the problem should be upstream as well.

Comment 2 Sofer Athlan-Guyot 2017-01-11 12:52:12 UTC
We need a way to detect if bigswitch plugin is used to be able to conditionally delete it.

Comment 3 mathieu bultel 2017-01-11 16:14:48 UTC
The issue upstream is not related to the package above ^
It's related to the python-networking-odl package.

I'll fill a LP bug on it, maybe i'll try to submit a fix to the networking-old project

Comment 4 mathieu bultel 2017-01-12 11:32:27 UTC
I add a fix in the bigswitch code:
https://review.openstack.org/419422

The networking-odl is already fix but not in the dlrn repo, we need to get the latest release (from dec 8) 3.2.

For now to workaround the issue we can add in the UpgradeInitCommand:
yum remove -y python-UcsSdk openstack-neutron-bigswitch-agent python-networking-bigswitch openstack-neutron-bigswitch-lldp python-networking-odl

Comment 6 Amit Ugol 2017-01-25 08:48:21 UTC
*** Bug 1416124 has been marked as a duplicate of this bug. ***

Comment 7 errata-xmlrpc 2017-05-17 19:56:24 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2017:1245


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