Ask Your Question
1

nova-docker issue. Import error: no module named i18n

asked 2014-09-29 09:31:41 -0500

mark91 gravatar image

updated 2014-09-29 11:27:38 -0500

Hello,

I'm trying to install nova-docker driver, following the README file at https://github.com/stackforge/nova-docker (https://github.com/stackforge/nova-do...) . I followed all the steps, but when I restart nova-compute, the service doesn't start and I get the following error in the log file:

2014-09-29 14:59:47.231 22982 INFO nova.virt.driver [-] Loading compute driver 'novadocker.virt.docker.DockerDriver'
2014-09-29 14:59:47.233 22982 ERROR nova.virt.driver [-] Unable to load the virtualization driver
2014-09-29 14:59:47.233 22982 TRACE nova.virt.driver Traceback (most recent call last):
2014-09-29 14:59:47.233 22982 TRACE nova.virt.driver   File "/usr/lib/python2.7/dist-packages/nova/virt/driver.py", line 1299, in load_compute_driver
2014-09-29 14:59:47.233 22982 TRACE nova.virt.driver     virtapi)
2014-09-29 14:59:47.233 22982 TRACE nova.virt.driver   File "/usr/lib/python2.7/dist-packages/nova/openstack/common/importutils.py", line 52, in import_object_ns
2014-09-29 14:59:47.233 22982 TRACE nova.virt.driver     return import_class(import_str)(*args, **kwargs)
2014-09-29 14:59:47.233 22982 TRACE nova.virt.driver   File "/usr/lib/python2.7/dist-packages/nova/openstack/common/importutils.py", line 28, in import_class
2014-09-29 14:59:47.233 22982 TRACE nova.virt.driver     __import__(mod_str)
2014-09-29 14:59:47.233 22982 TRACE nova.virt.driver   File "/usr/local/lib/python2.7/dist-packages/novadocker/virt/docker/__init__.py", line 20, in <module>
2014-09-29 14:59:47.233 22982 TRACE nova.virt.driver     from novadocker.virt.docker import driver
2014-09-29 14:59:47.233 22982 TRACE nova.virt.driver   File "/usr/local/lib/python2.7/dist-packages/novadocker/virt/docker/driver.py", line 31, in <module>
2014-09-29 14:59:47.233 22982 TRACE nova.virt.driver     from nova.i18n import _
2014-09-29 14:59:47.233 22982 TRACE nova.virt.driver ImportError: No module named i18n

Does anybody know why this happen and what I can do to solve this problem?

Thank you.


UPDATE

As larsks said, I have changed the code in my nova-docker to previous the commit 9ce916c4 and the error now changed to this:

2014-09-29 17:31:21.667 4979 ERROR nova.virt.driver [-] Unable to load the virtualization driver
2014-09-29 17:31:21.667 4979 TRACE nova.virt.driver Traceback (most recent call last):
2014-09-29 17:31:21.667 4979 TRACE nova.virt.driver   File "/usr/lib/python2.7/dist-packages/nova/virt/driver.py", line 1299, in load_compute_driver
2014-09-29 17:31:21.667 4979 TRACE nova.virt.driver     virtapi)
2014-09-29 17:31:21.667 4979 TRACE nova.virt.driver   File "/usr/lib/python2.7/dist-packages/nova/openstack/common/importutils.py", line 52, in import_object_ns
2014-09-29 17:31:21.667 4979 TRACE nova.virt.driver     return import_class(import_str)(*args, **kwargs)
2014-09-29 17:31:21.667 4979 TRACE nova.virt.driver   File "/usr/lib/python2.7/dist-packages/nova/openstack/common/importutils.py", line 28, in import_class
2014-09-29 17:31:21.667 4979 TRACE nova.virt.driver     __import__(mod_str)
2014-09-29 17:31:21.667 4979 TRACE nova.virt.driver ...
(more)
edit retag flag offensive close merge delete

Comments

Does novadocker/virt/docker/client.py exist?

larsks gravatar imagelarsks ( 2014-09-29 12:13:27 -0500 )edit

Yes, but this was just a temporary error. I don't know how it happened and when I tried to restart nova-compute this error disappeared, even doing nothing. It was just very strange!

mark91 gravatar imagemark91 ( 2014-09-29 12:35:51 -0500 )edit

If I can exploit your helpfulness, I have another issue. It says: Docker daemon is not running or is not reachable (check the rights on /var/run/docker.sock). But nova user is in the docker group and I did chmod 666 to the sock file. And docker service is running. Do you know why this happen? Thanks

mark91 gravatar imagemark91 ( 2014-09-29 12:38:19 -0500 )edit

You should post that as a seperate questions so we don't clutter of this one with unrelated comments.

larsks gravatar imagelarsks ( 2014-09-29 12:44:02 -0500 )edit

2 answers

Sort by ยป oldest newest most voted
3

answered 2014-09-29 09:56:36 -0500

larsks gravatar image

You can answer most of this by looking at the change history for the nova-docker module and for nova itself.

The use of nova.i18n in nova-docker was introduced by commit 9ce916c4, dated August 13, 2014. In nova, the i18n module was introduced in commit 826aed0, dated July 11, 2014.

You need to either revert that change in your local nova-docker, or you need to update your installed nova codebase to have the required support.

edit flag offensive delete link more

Comments

Thank you for your answer.

So, I should change the code before launching the setup.py file and undo the changes documented here ( https://github.com/stackforge/nova-docker/commit/9ce916c486a64bfac38fb665fbe7619cef4e1f92 (https://github.com/stackforge/nova-do...) ), am I right?

mark91 gravatar imagemark91 ( 2014-09-29 10:22:49 -0500 )edit

Something like that, yes. E.g., you could simply git checkout -b pre-i18n 9045ca43b645e72751099491bf5f4f9e4bddbb91 and then deploy from that.

larsks gravatar imagelarsks ( 2014-09-29 11:55:26 -0500 )edit

Thanks, now I have another issue, but you have solved my problem. Thank you very much for the help!

mark91 gravatar imagemark91 ( 2014-09-29 12:08:09 -0500 )edit
1

answered 2014-10-28 06:28:03 -0500

Thanks it solved my problem too, :-) i have a OpenStack Icehouse plus nova-docker

$ git checkout -b pre-i18n 9045ca43b645e72751099491bf5f4f9e4bddbb91

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-09-29 09:31:41 -0500

Seen: 3,223 times

Last updated: Oct 28 '14