Ask Your Question
1

Juno docker AttributeError: 'module' object has no attribute 'DockerDriver' [closed]

asked 2015-02-27 16:33:41 -0500

anonymous user

Anonymous

updated 2015-03-03 10:44:57 -0500

Greetings I have been unable to get docker working with juno on CentOS 7 by following these steps:

 pip install -e git+https://github.com/stackforge/nova-docker#egg=novadocker
cd src/novadocker/
python setup.py install

# configure nova
cp -p /etc/nova/nova.conf /etc/nova/.nova.conf.pre.docker
openstack-config --set /etc/nova/nova.conf DEFAULT compute_driver novadocker.virt.docker.DockerDriver

mkdir -p /etc/nova/rootwrap.d
cat > /etc/nova/rootwrap.d/docker.filters << 'EOF'
# nova-rootwrap command filters for setting up network in the docker driver
# This file should be owned by (and only-writeable by) the root user

[Filters]
# nova/virt/docker/driver.py: 'ln', '-sf', '/var/run/netns/.*'
ln: CommandFilter, /bin/ln, root
EOF

After nova start is attempted I see this in /var/log/messages:

Feb 27 16:21:08 docker01 systemd: Starting OpenStack Nova Compute Server...
Feb 27 16:21:09 docker01 nova-compute: 2015-02-27 16:21:09.238 6805 ERROR nova.virt.driver [-] Unable to load the virtualization driver
Feb 27 16:21:09 docker01 nova-compute: 2015-02-27 16:21:09.238 6805 TRACE nova.virt.driver Traceback (most recent call last):
Feb 27 16:21:09 docker01 nova-compute: 2015-02-27 16:21:09.238 6805 TRACE nova.virt.driver   File "/usr/lib/python2.7/site-packages/nova/virt/driver.py", line 1402, in load_compute_driver
Feb 27 16:21:09 docker01 nova-compute: 2015-02-27 16:21:09.238 6805 TRACE nova.virt.driver     virtapi)
Feb 27 16:21:09 docker01 nova-compute: 2015-02-27 16:21:09.238 6805 TRACE nova.virt.driver   File "/usr/lib/python2.7/site-packages/nova/openstack/common/importutils.py", line 52, in import_object_ns
Feb 27 16:21:09 docker01 nova-compute: 2015-02-27 16:21:09.238 6805 TRACE nova.virt.driver     return import_class(import_str)(*args, **kwargs)
Feb 27 16:21:09 docker01 nova-compute: 2015-02-27 16:21:09.238 6805 TRACE nova.virt.driver   File "/usr/lib/python2.7/site-packages/nova/openstack/common/importutils.py", line 33, in import_class
Feb 27 16:21:09 docker01 nova-compute: 2015-02-27 16:21:09.238 6805 TRACE nova.virt.driver     traceback.format_exception(*sys.exc_info())))
Feb 27 16:21:09 docker01 nova-compute: 2015-02-27 16:21:09.238 6805 TRACE nova.virt.driver ImportError: Class DockerDriver cannot be found (['Traceback (most recent call last):\n', '  File "/usr/lib/python2.7/site-packages/nova/openstack/common/importutils.py", line 29, in import_class\n    return getattr(sys.modules[mod_str], class_str)\n', "AttributeError: 'module' object has no attribute 'DockerDriver'\n"])

Docker is running:

# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
# docker version
Client version: 1.3.2
Client API version: 1.15
Go version (client): go1.3.3
Git commit (client): 39fa2fa/1.3.2
OS/Arch (client): linux/amd64
Server version: 1.3.2
Server API version: 1.15
Go version (server): go1.3.3
Git commit (server): 39fa2fa/1.3.2
#

Any suggestions?

Thanks

* UPDATE * Moved to docker 1.5:

 # docker version
Client version: 1.5.0
Client API version: 1.17
Go version (client): go1.4.1
Git commit (client): a8a31ef
OS/Arch (client ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by bigbandbasstrombone
close date 2015-03-03 13:39:00.531702

Comments

I am very sorry as of time of writing stable/juno branch worked fine for CentOS 7.

After installing NovaDocker driver and failure to restart nova-compute can you switch back to libvirt driver ?
dbaxps gravatar imagedbaxps ( 2015-03-03 11:04:59 -0500 )edit

Just this morning I was able load the most recent NovaDocker driver via devstack (stack.sh) on Ubuntu 14.04.2. However , it doesn't help much , view https://bugs.launchpad.net/devstack/+...

dbaxps gravatar imagedbaxps ( 2015-03-03 11:11:08 -0500 )edit

It appears to have been a permissions problem with /usr/lib/python2.7/site-packages/, I did a recursive chmod and now it's starting. Thanks for the help

bigbandbasstrombone gravatar imagebigbandbasstrombone ( 2015-03-03 13:38:41 -0500 )edit

2 answers

Sort by ยป oldest newest most voted
0

answered 2015-02-27 17:58:28 -0500

smaffulli gravatar image

My wild guess is that you're missing some python module for docker. Check that all the modules needed by nova docker have indeed been installed and available in your python env.

edit flag offensive delete link more
0

answered 2015-03-01 22:45:16 -0500

dbaxps gravatar image

updated 2015-03-06 15:05:10 -0500

In meantime the procedure (which worked) might crash RDO Juno openstack-nova-compute and wouldn't allow switch back to libvirt driver , but anyway stable/juno branch has to be checked out from https://github.com/stackforge/nova-do... . Master branch requires docker 1.5.

**********************
Update 03/03/2015 
**********************

I was not aware of https://bugs.launchpad.net/nova-docke... , for devstack bug fixed in nova-docker, one day before I filed mine. Working with the most recent

$ git clone http://github.com/stackforge/nova-docker.git
$ cd nova-docker
$ sudo pip install .

I am experiencing problems described in details here : https://bugs.launchpad.net/devstack/+...
Devstack loads NovaDocker driver updated to use oslo_log , but when I boot container via Nova , it starts but Network is disabled both floating and private IP don't work. I tested floating IP via arping (Layer 2) it responded, usual ping hangs, hping3 been started with FPU flag scans ports @floating-ip and gets packets back, what is a syndrome of closed ports. Details in link above.
03/06/2015 . I found the cause of network issue. It is https://git.openstack.org/cgit/stackf... .
In meantime network enabled NovaDocker driver may be installed via reverting commit 9d06520645f28d96ef905a709f8ff0c27842b58b

$ git clone http://github.com/stackforge/nova-docker.git
$ cd nova-docker
$ git revert 9d06520645f28d96ef905a709f8ff0c27842b58b
$ sudo pip install .

However , it's far ahead stable/juno branch and cannot affect this branch. vifs.py should stay the same in stable/juno.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2015-02-27 16:33:41 -0500

Seen: 637 times

Last updated: Mar 06 '15