nova-manage db sync failed

Asked by janson on 2011-02-21

when execute:

nova-manage --flagfile /etc/nova/nova.conf db sync

it occurs errors as follows:

(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/migrate-0.2.2-py2.6.egg/migrate/versioning/logengine.py", line 253, in __init__
(nova.root): TRACE: super(LogEngineStrategy,self).__init__('logsql')
(nova.root): TRACE: TypeError: __init__() takes exactly 1 argument (2 given)

any ideas ???

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Solved by:
Vish Ishaya
Solved:
2011-02-23
Last query:
2011-02-23
Last reply:
2011-02-22
Christian Berendt (berendt) said : #1

try "nova-manage --flagfile=/etc/nova/nova.conf db sync"

janson (janson071) said : #2

I am very sorry.

The result is all the same.

Vish Ishaya (vishvananda) said : #3

my guess is that you have the wrong version of sqlalchemy-migrate. I would pip install the new one.

On Feb 21, 2011, at 5:18 PM, janson wrote:

> Question #146204 on OpenStack Compute (nova) changed:
> https://answers.launchpad.net/nova/+question/146204
>
> janson posted a new comment:
> I am very sorry.
>
> The result is all the same.
>
> --
> You received this question notification because you are a member of Nova
> Core, which is an answer contact for OpenStack Compute (nova).

janson (janson071) said : #4

after I download the latest version of sqlalchemy-migrate(0.6.1),

an new error occurs as follows;

[root@localhost sqlalchemy-migrate-0.6.1]# nova-manage --flagfile /etc/nova/nova.conf db sync
2011-02-22 14:42:36,248 CRITICAL nova.root [-] cannot import name exceptions
(nova.root): TRACE: Traceback (most recent call last):
(nova.root): TRACE: File "/usr/bin/nova-manage", line 5, in <module>
(nova.root): TRACE: pkg_resources.run_script('nova==2011.1', 'nova-manage')
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 464, in run_script
(nova.root): TRACE: self.require(requires)[0].run_script(script_name, ns)
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 1197, in run_script
(nova.root): TRACE: execfile(script_filename, namespace, namespace)
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/nova-2011.1-py2.6.egg/EGG-INFO/scripts/nova-manage", line 694, in <module>
(nova.root): TRACE: main()
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/nova-2011.1-py2.6.egg/EGG-INFO/scripts/nova-manage", line 686, in main
(nova.root): TRACE: fn(*argv)
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/nova-2011.1-py2.6.egg/EGG-INFO/scripts/nova-manage", line 565, in sync
(nova.root): TRACE: return migration.db_sync(version)
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/nova-2011.1-py2.6.egg/nova/db/migration.py", line 33, in db_sync
(nova.root): TRACE: return IMPL.db_sync(version=version)
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/nova-2011.1-py2.6.egg/nova/utils.py", line 331, in __getattr__
(nova.root): TRACE: backend = self.__get_backend()
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/nova-2011.1-py2.6.egg/nova/utils.py", line 326, in __get_backend
(nova.root): TRACE: self.__backend = __import__(name, None, None, fromlist)
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/nova-2011.1-py2.6.egg/nova/db/sqlalchemy/migration.py", line 25, in <module>
(nova.root): TRACE: from migrate.versioning import exceptions as versioning_exceptions
(nova.root): TRACE: ImportError: cannot import name exceptions

Best Vish Ishaya (vishvananda) said : #5

That bug was fixed recently. You can go back to 0.6.0 or merge this patch:
https://code.launchpad.net/~usc-isi/nova/lp-717467/+merge/49702

On Feb 21, 2011, at 10:46 PM, janson wrote:

> Question #146204 on OpenStack Compute (nova) changed:
> https://answers.launchpad.net/nova/+question/146204
>
> janson posted a new comment:
> after I download the latest version of sqlalchemy-migrate(0.6.1),
>
> an new error occurs as follows;
>
> [root@localhost sqlalchemy-migrate-0.6.1]# nova-manage --flagfile /etc/nova/nova.conf db sync
> 2011-02-22 14:42:36,248 CRITICAL nova.root [-] cannot import name exceptions
> (nova.root): TRACE: Traceback (most recent call last):
> (nova.root): TRACE: File "/usr/bin/nova-manage", line 5, in <module>
> (nova.root): TRACE: pkg_resources.run_script('nova==2011.1', 'nova-manage')
> (nova.root): TRACE: File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 464, in run_script
> (nova.root): TRACE: self.require(requires)[0].run_script(script_name, ns)
> (nova.root): TRACE: File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 1197, in run_script
> (nova.root): TRACE: execfile(script_filename, namespace, namespace)
> (nova.root): TRACE: File "/usr/lib/python2.6/site-packages/nova-2011.1-py2.6.egg/EGG-INFO/scripts/nova-manage", line 694, in <module>
> (nova.root): TRACE: main()
> (nova.root): TRACE: File "/usr/lib/python2.6/site-packages/nova-2011.1-py2.6.egg/EGG-INFO/scripts/nova-manage", line 686, in main
> (nova.root): TRACE: fn(*argv)
> (nova.root): TRACE: File "/usr/lib/python2.6/site-packages/nova-2011.1-py2.6.egg/EGG-INFO/scripts/nova-manage", line 565, in sync
> (nova.root): TRACE: return migration.db_sync(version)
> (nova.root): TRACE: File "/usr/lib/python2.6/site-packages/nova-2011.1-py2.6.egg/nova/db/migration.py", line 33, in db_sync
> (nova.root): TRACE: return IMPL.db_sync(version=version)
> (nova.root): TRACE: File "/usr/lib/python2.6/site-packages/nova-2011.1-py2.6.egg/nova/utils.py", line 331, in __getattr__
> (nova.root): TRACE: backend = self.__get_backend()
> (nova.root): TRACE: File "/usr/lib/python2.6/site-packages/nova-2011.1-py2.6.egg/nova/utils.py", line 326, in __get_backend
> (nova.root): TRACE: self.__backend = __import__(name, None, None, fromlist)
> (nova.root): TRACE: File "/usr/lib/python2.6/site-packages/nova-2011.1-py2.6.egg/nova/db/sqlalchemy/migration.py", line 25, in <module>
> (nova.root): TRACE: from migrate.versioning import exceptions as versioning_exceptions
> (nova.root): TRACE: ImportError: cannot import name exceptions
>
> --
> You received this question notification because you are a member of Nova
> Core, which is an answer contact for OpenStack Compute (nova).

janson (janson071) said : #6

Thanks Vish Ishaya, that solved my question.

Rick Harris (rconradharris) said : #7

I received this error when I pip installed `migrate` instead of `sqlalchemy-migrate`. To fix I did:

pip uninstall migrate
pip install sqlalchemy-migrate