Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

docker setup on kilo

Setup kilo and have integrated docker in it. Below are steps follow.

git clone https://github.com/stackforge/nova-docker.git

cd nova-docker/

python setup.py install

chmod 666 /var/run/docker.sock

vim /etc/nova/nova.conf

compute_driver=novadocker.virt.docker.DockerDriver

mkdir /etc/nova/rootwrap.d

cd /etc/nova/rootwrap.d

vim docker.filters

# 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

vim /etc/glance/glance-api.conf

container_formats=ami,ari,aki,bare,ovf,ova,docker

systemctl restart openstack-glance-api

systemctl restart openstack-nova-compute

getting following exception in compute log-- any help?

2015-05-29 16:45:48.571 22384 ERROR nova.openstack.common.threadgroup [req-d63e8d1f-dddd-42d5-b402-2b7cd2e7b990 - - - - -] 'module' object has no attribute 'DOCKER' 2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup Traceback (most recent call last): 2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/site-packages/nova/openstack/common/threadgroup.py", line 145, in wait 2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup x.wait() 2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/site-packages/nova/openstack/common/threadgroup.py", line 47, in wait 2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup return self.thread.wait() 2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/site-packages/eventlet/greenthread.py", line 175, in wait 2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup return self._exit_event.wait() 2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/site-packages/eventlet/event.py", line 121, in wait 2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup return hubs.get_hub().switch() 2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/site-packages/eventlet/hubs/hub.py", line 294, in switch 2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup return self.greenlet.switch() 2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/site-packages/eventlet/greenthread.py", line 214, in main 2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup result = function(args, *kwargs) 2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/site-packages/nova/openstack/common/service.py", line 497, in run_service 2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup service.start() 2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/site-packages/nova/service.py", line 183, in start 2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup self.manager.pre_start_hook() 2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 1291, in pre_start_hook 2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup self.update_available_resource(nova.context.get_admin_context()) 2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 6240, in update_available_resource 2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup rt.update_available_resource(context) 2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/site-packages/nova/compute/resource_tracker.py", line 376, in update_available_resource 2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup resources = self.driver.get_available_resource(self.nodename) 2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/site-packages/novadocker/virt/docker/driver.py", line 312, in get_available_resource 2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup (arch.I686, hv_type.DOCKER, vm_mode.EXE), 2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup AttributeError: 'module' object has no attribute 'DOCKER' 2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup (END)

docker setup on kilo

Setup kilo and have integrated docker in it. Below are steps follow.

git clone https://github.com/stackforge/nova-docker.git

cd nova-docker/

python setup.py install

chmod 666 /var/run/docker.sock

vim /etc/nova/nova.conf

compute_driver=novadocker.virt.docker.DockerDriver

mkdir /etc/nova/rootwrap.d

cd /etc/nova/rootwrap.d

vim docker.filters

# 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

vim /etc/glance/glance-api.conf

container_formats=ami,ari,aki,bare,ovf,ova,docker

systemctl restart openstack-glance-api

systemctl restart openstack-nova-compute

getting following exception in compute log-- any help?

2015-05-29 16:45:48.571 22384 ERROR nova.openstack.common.threadgroup [req-d63e8d1f-dddd-42d5-b402-2b7cd2e7b990 - - - - -] 'module' object has no attribute 'DOCKER'
2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup Traceback (most recent call last):
2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/openstack/common/threadgroup.py", line 145, in wait
2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup     x.wait()
2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/openstack/common/threadgroup.py", line 47, in wait
2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup     return self.thread.wait()
2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/eventlet/greenthread.py", line 175, in wait
2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup     return self._exit_event.wait()
2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/eventlet/event.py", line 121, in wait
2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup     return hubs.get_hub().switch()
2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/eventlet/hubs/hub.py", line 294, in switch
2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup     return self.greenlet.switch()
2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/eventlet/greenthread.py", line 214, in main
2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup     result = function(args, *kwargs)
function(*args, **kwargs)
2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/openstack/common/service.py", line 497, in run_service
2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup     service.start()
2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/service.py", line 183, in start
2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup     self.manager.pre_start_hook()
2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 1291, in pre_start_hook
2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup     self.update_available_resource(nova.context.get_admin_context())
2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 6240, in update_available_resource
2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup     rt.update_available_resource(context)
2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/compute/resource_tracker.py", line 376, in update_available_resource
2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup     resources = self.driver.get_available_resource(self.nodename)
2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/novadocker/virt/docker/driver.py", line 312, in get_available_resource
2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup     (arch.I686, hv_type.DOCKER, vm_mode.EXE),
2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup AttributeError: 'module' object has no attribute 'DOCKER'
2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup

(END)