Nova-compute does not work with docker "hypervisor".
I have 2 node setup. One is controller, one is compute. On the compute node I have docker installed as hypervisor, with the appropriate driver. Followed the how-to from here: https://wiki.openstack.org/wiki/Docker I do not want to go the docker-heat way.
I am using Ubuntu 14.04 + Icehouse on both nodes.
This is my /etc/nova/nova.conf on the compute host:
[DEFAULT]
dhcpbridge_flagfile=/etc/nova/nova.conf
dhcpbridge=/usr/bin/nova-dhcpbridge
logdir=/var/log/nova
state_path=/var/lib/nova
lock_path=/var/lock/nova
force_dhcp_release=True
iscsi_helper=tgtadm
libvirt_use_virtio_for_bridges=True
connection_type=libvirt
root_helper=sudo nova-rootwrap /etc/nova/rootwrap.conf
verbose=True
ec2_private_dns_show_ip=True
api_paste_config=/etc/nova/api-paste.ini
volumes_path=/var/lib/nova/volumes
enabled_apis=ec2,osapi_compute,metadata
auth_strategy = keystone
rpc_backend = rabbit
rabbit_host = sta-controller-1
rabbit_password = password
my_ip = 10.248.0.111
vnc_enabled = True
vncserver_listen = 0.0.0.0
vncserver_proxyclient_address = 10.248.0.111
novncproxy_base_url = http://192.168.248.8:6080/vnc_auto.html
glance_host = sta-controller-1
compute_driver = novadocker.virt.docker.DockerDriver
scheduler_default_filters = ComputeFilter
[database]
connection = mysql://nova:password@sta-controller-1/nova
[keystone_authtoken]
auth_uri = http://sta-controller-1:5000
auth_host = sta-controller-1
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = nova
admin_password = password
I managed to start a container with "nova boot .....". Then I called it the day. I came back the next morning and was unable to start another container. The nova-compute service was dead, and does not want to start again. It complains about libvirt, and does not want to use docker any more. This is the log:
2014-11-03 15:50:46.644 26436 ERROR nova.virt.libvirt.driver [-] Connection to libvirt failed: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied
2014-11-03 15:50:46.644 26436 TRACE nova.virt.libvirt.driver Traceback (most recent call last):
2014-11-03 15:50:46.644 26436 TRACE nova.virt.libvirt.driver File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 789, in _connect
2014-11-03 15:50:46.644 26436 TRACE nova.virt.libvirt.driver libvirt.openAuth, uri, auth, flags)
2014-11-03 15:50:46.644 26436 TRACE nova.virt.libvirt.driver File "/usr/lib/python2.7/dist-packages/eventlet/tpool.py", line 139, in proxy_call
2014-11-03 15:50:46.644 26436 TRACE nova.virt.libvirt.driver rv = execute(f,*args,**kwargs)
2014-11-03 15:50:46.644 26436 TRACE nova.virt.libvirt.driver File "/usr/lib/python2.7/dist-packages/eventlet/tpool.py", line 77, in tworker
2014-11-03 15:50:46.644 26436 TRACE nova.virt.libvirt.driver rv = meth(*args,**kwargs)
2014-11-03 15:50:46.644 26436 TRACE nova.virt.libvirt.driver File "/usr/lib/python2.7/dist-packages/libvirt.py", line 105, in openAuth
2014-11-03 15:50:46.644 26436 TRACE nova.virt.libvirt.driver if ret is None:raise libvirtError('virConnectOpenAuth() failed')
2014-11-03 15:50:46.644 26436 TRACE nova.virt.libvirt.driver libvirtError: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied
2014-11-03 15:50:46.644 26436 TRACE nova.virt.libvirt.driver
2014-11-03 15:50:46.731 26436 ERROR nova.openstack.common.threadgroup [-] Connection to the hypervisor is ...