Bug 1573353 - FFU: neutron-db-manage upgrade head fails during OSP12 upgrade with: alembic.script.revision.ResolutionError: No such revision or branch '66cc6bc031de'
Summary: FFU: neutron-db-manage upgrade head fails during OSP12 upgrade with: alembic....
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: rhosp-director
Version: 13.0 (Queens)
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: rc
: ---
Assignee: Lukas Bezdicka
QA Contact: Amit Ugol
URL:
Whiteboard:
Depends On: 1576427
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-01 01:22 UTC by Marius Cornea
Modified: 2018-05-09 14:54 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1576427 (view as bug list)
Environment:
Last Closed: 2018-05-09 14:54:27 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Marius Cornea 2018-05-01 01:22:11 UTC
Description of problem:
FFU: neutron-db-manage upgrade head fails during OSP12 upgrade with: alembic.script.revision.ResolutionError: No such revision or branch '66cc6bc031de':

[root@controller-0 heat-admin]# neutron-db-manage 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
INFO  [alembic.runtime.migration] Context impl MySQLImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
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 687, 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 206, in do_upgrade
    run_sanity_checks(config, revision)
  File "/usr/lib/python2.7/site-packages/neutron/db/migration/cli.py", line 671, 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/networking_bigswitch/plugins/bigswitch/db/migration/alembic_migrations/env.py", line 86, in <module>
    run_migrations_online()
  File "/usr/lib/python2.7/site-packages/networking_bigswitch/plugins/bigswitch/db/migration/alembic_migrations/env.py", line 77, in run_migrations_online
    context.run_migrations()
  File "<string>", line 8, in run_migrations
  File "/usr/lib/python2.7/site-packages/alembic/runtime/environment.py", line 797, in run_migrations
    self.get_context().run_migrations(**kw)
  File "/usr/lib/python2.7/site-packages/alembic/runtime/migration.py", line 303, in run_migrations
    for step in self._migrations_fn(heads, self):
  File "/usr/lib/python2.7/site-packages/neutron/db/migration/cli.py", line 662, in check_sanity
    revision, rev, implicit_base=True):
  File "/usr/lib/python2.7/site-packages/alembic/script/revision.py", line 641, in _iterate_revisions
    requested_lowers = self.get_revisions(lower)
  File "/usr/lib/python2.7/site-packages/alembic/script/revision.py", line 298, in get_revisions
    return sum([self.get_revisions(id_elem) for id_elem in id_], ())
  File "/usr/lib/python2.7/site-packages/alembic/script/revision.py", line 303, in get_revisions
    for rev_id in resolved_id)
  File "/usr/lib/python2.7/site-packages/alembic/script/revision.py", line 303, in <genexpr>
    for rev_id in resolved_id)
  File "/usr/lib/python2.7/site-packages/alembic/script/revision.py", line 358, in _revision_for_ident
    resolved_id)
alembic.script.revision.ResolutionError: No such revision or branch '66cc6bc031de'


Version-Release number of selected component (if applicable):
python-networking-bigswitch-11.0.3-1.el7ost.noarch

How reproducible:
100%

Steps to Reproduce:
1. Deploy OSP10
2. Run FFU procedure

Actual results:
While upgrading the controller to OSP12  neutron-db-manage upgrade head fails.

Expected results:
No failure.

Additional info:

Comment 1 bigswitch 2018-05-01 14:30:37 UTC
Hi,

This seems to be due to a stale plugin version '11.0.3' as seen in the package name 'python-networking-bigswitch-11.0.3-1.el7ost.noarch'.

There was a change that updated DB scripts and the tagged version for that change was 11.0.4.

And looking at the tagged releases, the latest was pushed recently: 11.47.1 (*minor version follows the BCF release number. It was previously 0 because it was in QA phase).

How can we update the package version used/present in the ISO image used for installation?
During local deployment, our deployment guide has a step to update the networking-bigswitch package in the ISO image to the latest using virt-customize.

I believe we did something similar during OSP 10 and 11 as well.
Hope the above info helps. Let me know if I can provide any more info.

Thanks!
- Aditya

Comment 2 Marios Andreou 2018-05-07 12:43:43 UTC
lbezdick can you please triage this (from triage call round robin)


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