Comment 5 for bug 1347243

Revision history for this message
Jeff Silverman (jeffsilverm) wrote : Re: [Bug 1347243] Re: nova-manage db sync throws an import error

Dmitry,

We are not using fuel.

Jeff

On Wed, Jul 23, 2014 at 9:30 AM, Jeff Silverman <email address hidden>
wrote:

> Dmitry,
>
> Thank you for your quick response.
>
> <email address hidden>:~# echo $PYTHONPATH
>
> <email address hidden>:~# su -s /bin/sh -c "nova-manage
> db sync" nova
> Command failed, please check log for more info
> <email address hidden>:~# echo $PYTHONPATH
>
> <email address hidden>:~# tail
> /var/log/nova/nova-manage.log
> 2014-07-22 15:18:35.279 18396 CRITICAL nova [-] ImportError: cannot
> import name exceptions
>
> 2014-07-22 19:58:15.653 21403 CRITICAL nova [-] ImportError: cannot import
> name exceptions
>
> 2014-07-23 09:29:04.627 28760 CRITICAL nova [-] ImportError: cannot import
> name exceptions
>
> <email address hidden>:~#
>
> How do I tell if I am using fuel? How do I diagnose which sqlalchemy I am
> using?
>
>
> Many thanks,
>
>
> Jeff Silverman
>
>
>
>
> On Wed, Jul 23, 2014 at 2:30 AM, Dmitry Ilyin <email address hidden>
> wrote:
>
>> Strage. I does'n throw this error on my deployments. Both Ubuntu and
>> Centos...
>>
>> Oh, wait! You aren't using Fuel, aren't ye? And you can't import
>> sqlalchemy but it's present.
>> Hmm... looks linke OpenStack components use their own sqlalchemy
>> componets insead of system-wide and perhaps they mess with python's include
>> path to do so.
>>
>> --
>> You received this bug notification because you are subscribed to the bug
>> report.
>> https://bugs.launchpad.net/bugs/1347243
>>
>> Title:
>> nova-manage db sync throws an import error
>>
>> Status in Fuel: OpenStack installer that works:
>> New
>>
>> Bug description:
>> I am following the instructions in
>>
>> When I run nova-manage db sync, I get the following:
>>
>> <email address hidden>:~# su -s /bin/sh -c "nova-manage
>> db sync" nova
>> Command failed, please check log for more info
>> <email address hidden>:~#
>> <email address hidden>:~# tail
>> /var/log/nova/nova-manage.log
>> 2014-07-22 15:18:35.279 18396 CRITICAL nova [-] ImportError: cannot
>> import name exceptions
>>
>> <email address hidden>:~#
>>
>>
>> I did some checking. nova-manage is a python program, so I ran it with
>> the debugger pdb. I find:
>>
>> (Pdb) c
>> Command failed, please check log for more info
>> Traceback (most recent call last):
>> File "/usr/lib64/python2.6/pdb.py", line 1296, in main
>> pdb._runscript(mainpyfile)
>> File "/usr/lib64/python2.6/pdb.py", line 1215, in _runscript
>> self.run(statement)
>> File "/usr/lib64/python2.6/bdb.py", line 372, in run
>> exec cmd in globals, locals
>> File "<string>", line 1, in <module>
>> File "/usr/bin/nova-manage", line 10, in <module>
>> sys.exit(main())
>> File "/usr/lib/python2.6/site-packages/nova/cmd/manage.py", line
>> 1374, in main
>> ret = fn(*fn_args, **fn_kwargs)
>> File "/usr/lib/python2.6/site-packages/nova/cmd/manage.py", line 883,
>> in sync
>> return migration.db_sync(version)
>> File "/usr/lib/python2.6/site-packages/nova/db/migration.py", line
>> 29, in db_sync
>> return IMPL.db_sync(version=version)
>> File "/usr/lib/python2.6/site-packages/nova/utils.py", line 427, in
>> __getattr__
>> backend = self.__get_backend()
>> File "/usr/lib/python2.6/site-packages/nova/utils.py", line 423, in
>> __get_backend
>> self.__backend = __import__(name, None, None, fromlist)
>> File
>> "/usr/lib/python2.6/site-packages/nova/db/sqlalchemy/migration.py", line
>> 20, in <module>
>> from migrate.versioning import api as versioning_api
>> File "/usr/lib/python2.6/site-packages/migrate/versioning/api.py",
>> line 32, in <module>
>> from migrate.versioning import (exceptions, repository, schema,
>> version,
>> File "/usr/lib/python2.6/site-packages/migrate/versioning/schema.py",
>> line 10, in <module>
>> from sqlalchemy import exceptions as sa_exceptions
>> ImportError: cannot import name exceptions
>> Uncaught exception. Entering post mortem debugging
>> Running 'cont' or 'step' will restart the program
>> >
>> /usr/lib/python2.6/site-packages/migrate/versioning/schema.py(10)<module>()
>> -> from sqlalchemy import exceptions as sa_exceptions
>> (Pdb)
>>
>>
>> <email address hidden>:~# python /usr/bin/nova-manage
>> --version
>> 2014.1.1
>> <email address hidden>:~#
>>
>>
>> What other information would be helpful in pursuing this problem?
>>
>> Thank you
>>
>>
>> Jeff Silverman
>>
>> To manage notifications about this bug go to:
>> https://bugs.launchpad.net/fuel/+bug/1347243/+subscriptions
>>
>
>
>
> --
> Jeff Silverman, linux sysadmin
> nine two four twentieth avenue east
> Seattle, WA, nine eight one one two -3507
> (2O6) 329-1O94
> <email address hidden> (note the zero!)
> http://www.commercialventvac.co <http://www.commercialventvac.com/~jeffs/>
> m
> Read my book, "Failure is Not an Option: How to build reliable computer
> systems from unreliable parts using Open Source software"
> http://www.commercialventvac.com/finao/index.html"
>

--
Jeff Silverman, linux sysadmin
nine two four twentieth avenue east
Seattle, WA, nine eight one one two -3507
(2O6) 329-1O94
<email address hidden> (note the zero!)
http://www.commercialventvac.co <http://www.commercialventvac.com/~jeffs/>m
Read my book, "Failure is Not an Option: How to build reliable computer
systems from unreliable parts using Open Source software"
http://www.commercialventvac.com/finao/index.html"