Bug 1022653 - RDO-grizzly quantum-db-manage fails
RDO-grizzly quantum-db-manage fails
Status: CLOSED NOTABUG
Product: RDO
Classification: Community
Component: openstack-quantum (Show other bugs)
unspecified
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: RHOS Maint
Ofer Blaut
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-23 13:50 EDT by Dan Smith
Modified: 2013-10-23 16:27 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-23 16:27:02 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Dan Smith 2013-10-23 13:50:27 EDT
Description of problem:

quantum-db-manage fails with a stack trace

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

openstack-quantum-2013.1.3-1.el6.noarch

How reproducible:

Always

Steps to Reproduce:
1. Install RDO-grizzly
2. Install packstack
3. Run packstack --allinone
4. Run "quantum-db-manage upgrade head"

Actual results:

Stack trace:

[root@centos2 ~]# quantum-db-manage upgrade head
Traceback (most recent call last):
  File "/usr/bin/quantum-db-manage", line 26, in <module>
    main()
  File "/usr/lib/python2.6/site-packages/quantum/db/migration/cli.py", line 137, in main
    CONF.command.func(config, CONF.command.name)
  File "/usr/lib/python2.6/site-packages/quantum/db/migration/cli.py", line 76, in do_upgrade_downgrade
    do_alembic_command(config, cmd, revision, sql=CONF.command.sql)
  File "/usr/lib/python2.6/site-packages/quantum/db/migration/cli.py", line 55, in do_alembic_command
    getattr(alembic_command, cmd)(config, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/alembic/command.py", line 124, in upgrade
    script.run_env()
  File "/usr/lib/python2.6/site-packages/alembic/script.py", line 191, in run_env
    util.load_python_file(self.dir, 'env.py')
  File "/usr/lib/python2.6/site-packages/alembic/util.py", line 186, in load_python_file
    module = imp.load_source(module_id, path, open(path, 'rb'))
  File "/usr/lib/python2.6/site-packages/quantum/db/migration/alembic_migrations/env.py", line 39, in <module>
    plugin_klass = importutils.import_class(quantum_config.core_plugin)
  File "/usr/lib/python2.6/site-packages/quantum/openstack/common/importutils.py", line 35, in import_class
    traceback.format_exception(*sys.exc_info())))
ImportError: Class  cannot be found (['Traceback (most recent call last):\n', '  File "/usr/lib/python2.6/site-packages/quantum/openstack/common/importutils.py", line 30, in import_class\n    __import__(mod_str)\n', 'ValueError: Empty module name\n'])

Expected results:

No stack trace, and schema upgraded (if needed)

Additional info:

[root@centos2 ~]# grep plugin /etc/quantum/quantum.conf 
# Quantum plugin provider module
# core_plugin =
core_plugin =quantum.plugins.openvswitch.ovs_quantum_plugin.OVSQuantumPluginV2
# service_plugins =
# <service>:<plugin>[:driver]
Comment 1 Lars Kellogg-Stedman 2013-10-23 16:11:56 EDT
Running:

    quantum-db-manage --config-file /etc/quantum/quantum.conf --config-file /etc/quantum/plugin.ini upgrade head

will avoid that error.  But note that you will need to run the "stamp" command first for it to be successful:

    quantum-db-manage --config-file /etc/quantum/quantum.conf --config-file /etc/quantum/plugin.ini stamp grizzly
Comment 2 Dan Smith 2013-10-23 16:27:02 EDT
Yep, meant to close this after I figured it out, thanks.

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