Bug 1506272 - octavia-db-manage upgrade head crashes
Summary: octavia-db-manage upgrade head crashes
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: puppet-tripleo
Version: 12.0 (Pike)
Hardware: All
OS: Linux
Target Milestone: rc
: 12.0 (Pike)
Assignee: Or Idgar
QA Contact: Alexander Stafeyev
Depends On:
TreeView+ depends on / blocked
Reported: 2017-10-25 14:32 UTC by Or Idgar
Modified: 2019-09-10 14:10 UTC (History)
10 users (show)

Fixed In Version: puppet-tripleo-7.4.3-0.20171025110206.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2017-12-13 22:18:18 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:3462 0 normal SHIPPED_LIVE Red Hat OpenStack Platform 12.0 Enhancement Advisory 2018-02-16 01:43:25 UTC

Description Or Idgar 2017-10-25 14:32:43 UTC
Description of problem:
when running octavia-db-manage upgrade head in order to build the db, the command line fails and crashes. function trace is printed out.

Version-Release number of selected component (if applicable):

How reproducible:
Installing director with octavia. you'll see the logs by connecting to the controller and run "docker logs octavia_db_sync".

Steps to Reproduce:
1.setup deployed with jenkins job https://rhos-qe-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/job/OSPD-Customized-Deployment-virt/1337/ 
2. connect to the controller with root user
3. type "docker logs octavia_db_sync"

Actual results:
Traceback (most recent call last):
  File "/usr/bin/octavia-db-manage", line 10, in <module>
  File "/usr/lib/python2.7/site-packages/octavia/db/migration/cli.py", line 132, in main
    CONF.command.func(config, CONF.command.name)
  File "/usr/lib/python2.7/site-packages/octavia/db/migration/cli.py", line 62, in do_upgrade
    do_alembic_command(config, cmd, revision, sql=CONF.command.sql)
  File "/usr/lib/python2.7/site-packages/octavia/db/migration/cli.py", line 30, in do_alembic_command
    getattr(alembic_cmd, cmd)(config, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/alembic/command.py", line 174, in upgrade
  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/octavia/db/migration/alembic_migrations/env.py", line 92, in <module>
  File "/usr/lib/python2.7/site-packages/octavia/db/migration/alembic_migrations/env.py", line 76, in run_migrations_online
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/__init__.py", line 387, in create_engine
    return strategy.create(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/strategies.py", line 52, in create
    plugins = u._instantiate_plugins(kwargs)
AttributeError: 'NoneType' object has no attribute '_instantiate_plugins'

Expected results:
The output should be similar to this -
INFO  [alembic.runtime.migration] Context impl MySQLImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
INFO  [alembic.runtime.migration] Running upgrade  -> 35dee79d5865, initial_create
INFO  [alembic.runtime.migration] Running upgrade 35dee79d5865 -> 4c094013699a, update load balancer amphora relationship
INFO  [alembic.runtime.migration] Running upgrade 4c094013699a -> 13500e2e978d, update url and name size

Additional info:
In the undercloud machine you can find under /home/stack/overcloud_deploy.sh the overcloud's deployment script.

Comment 1 Nir Magnezi 2017-10-31 10:31:47 UTC
Or and myself looked at this issue and it seems like there was a problem with the DB creation during the installation process.

So in a similar concept to the what happens in the devstack plugin[1], it seems like it tried to populate the database but it never got created.

Or, please check and report how we can get more details here (debug level logs etc). we need to understand why that DB never got created.

[1] https://github.com/openstack/octavia/blob/master/devstack/plugin.sh#L281-L282

Comment 6 Alexander Stafeyev 2017-11-12 07:53:38 UTC

Could you please let me know hen you have the setup deployed inorder to verify this bug ? 


Comment 8 Or Idgar 2017-11-22 09:49:08 UTC
Patch is included in the latest puddle. feel free to test it.

Comment 12 errata-xmlrpc 2017-12-13 22:18:18 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.


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