Nova-Compute-kvm fails in ubuntu server 13.04

Bug #1172906 reported by Msekni
28
This bug affects 4 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Undecided
Unassigned
nova (Ubuntu)
Won't Fix
High
Unassigned

Bug Description

So I have installed the latest ubuntu server 13.04 where KVM package has been replaced by qemu-system-x86.
When i install nova-compute-kvm, it doesn't start because there is no connection to libvirt ! I have tried to used nova-compute-qemu instead of nova-compute-kvm but the problem still persists (see Log below)

My processor supports virtualisation and i used to create VMs normally when i had Folsom. After updating ubuntu server 12.10 to ubuntu 13.04, it seems that things changed and communication to libvirt is lost. This is the nova-compute.log :

2013-04-25 20:48:49.307 2338 ERROR nova.virt.libvirt.driver [-] Connection to libvirt failed: Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory
2013-04-25 20:48:49.307 2338 TRACE nova.virt.libvirt.driver Traceback (most recent call last):
2013-04-25 20:48:49.307 2338 TRACE nova.virt.libvirt.driver File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 627, in _connect
2013-04-25 20:48:49.307 2338 TRACE nova.virt.libvirt.driver return libvirt.openAuth(uri, auth, 0)
2013-04-25 20:48:49.307 2338 TRACE nova.virt.libvirt.driver File "/usr/lib/python2.7/dist-packages/libvirt.py", line 102, in openAuth
2013-04-25 20:48:49.307 2338 TRACE nova.virt.libvirt.driver if ret is None:raise libvirtError('virConnectOpenAuth() failed')
2013-04-25 20:48:49.307 2338 TRACE nova.virt.libvirt.driver libvirtError: Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory
2013-04-25 20:48:49.307 2338 TRACE nova.virt.libvirt.driver
2013-04-25 20:48:49.334 2338 WARNING nova.virt.libvirt.driver [-] URI qemu:///system does not support events
2013-04-25 20:48:49.334 2338 ERROR nova.virt.libvirt.driver [-] Nova requires libvirt version 0.9.6 or greater.
2013-04-25 20:48:49.373 2338 ERROR nova.virt.libvirt.driver [-] Connection to libvirt failed: Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory
2013-04-25 20:48:49.373 2338 TRACE nova.virt.libvirt.driver Traceback (most recent call last):
2013-04-25 20:48:49.373 2338 TRACE nova.virt.libvirt.driver File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 627, in _connect
2013-04-25 20:48:49.373 2338 TRACE nova.virt.libvirt.driver return libvirt.openAuth(uri, auth, 0)
2013-04-25 20:48:49.373 2338 TRACE nova.virt.libvirt.driver File "/usr/lib/python2.7/dist-packages/libvirt.py", line 102, in openAuth
2013-04-25 20:48:49.373 2338 TRACE nova.virt.libvirt.driver if ret is None:raise libvirtError('virConnectOpenAuth() failed')
2013-04-25 20:48:49.373 2338 TRACE nova.virt.libvirt.driver libvirtError: Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory
2013-04-25 20:48:49.373 2338 TRACE nova.virt.libvirt.driver
2013-04-25 20:48:49.374 WARNING nova.virt.libvirt.driver [req-b678205e-5535-4bcc-aeed-022d48cb2ede None None] URI qemu:///system does not support events
2013-04-25 20:48:49.401 2338 CRITICAL nova [-] 'NoneType' object has no attribute 'numOfDomains'
2013-04-25 20:48:49.401 2338 TRACE nova Traceback (most recent call last):
2013-04-25 20:48:49.401 2338 TRACE nova File "/usr/bin/nova-compute", line 85, in <module>
2013-04-25 20:48:49.401 2338 TRACE nova service.wait()
2013-04-25 20:48:49.401 2338 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/service.py", line 689, in wait
2013-04-25 20:48:49.401 2338 TRACE nova _launcher.wait()
2013-04-25 20:48:49.401 2338 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/service.py", line 209, in wait
2013-04-25 20:48:49.401 2338 TRACE nova super(ServiceLauncher, self).wait()
2013-04-25 20:48:49.401 2338 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/service.py", line 179, in wait
2013-04-25 20:48:49.401 2338 TRACE nova service.wait()
2013-04-25 20:48:49.401 2338 TRACE nova File "/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line 168, in wait
2013-04-25 20:48:49.401 2338 TRACE nova return self._exit_event.wait()
2013-04-25 20:48:49.401 2338 TRACE nova File "/usr/lib/python2.7/dist-packages/eventlet/event.py", line 116, in wait
2013-04-25 20:48:49.401 2338 TRACE nova return hubs.get_hub().switch()
2013-04-25 20:48:49.401 2338 TRACE nova File "/usr/lib/python2.7/dist-packages/eventlet/hubs/hub.py", line 187, in switch
2013-04-25 20:48:49.401 2338 TRACE nova return self.greenlet.switch()
2013-04-25 20:48:49.401 2338 TRACE nova File "/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line 194, in main
2013-04-25 20:48:49.401 2338 TRACE nova result = function(*args, **kwargs)
2013-04-25 20:48:49.401 2338 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/service.py", line 147, in run_server
2013-04-25 20:48:49.401 2338 TRACE nova server.start()
2013-04-25 20:48:49.401 2338 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/service.py", line 429, in start
2013-04-25 20:48:49.401 2338 TRACE nova self.manager.init_host()
2013-04-25 20:48:49.401 2338 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 583, in init_host
2013-04-25 20:48:49.401 2338 TRACE nova self._destroy_evacuated_instances(context)
2013-04-25 20:48:49.401 2338 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 434, in _destroy_evacuated_instances
2013-04-25 20:48:49.401 2338 TRACE nova local_instances = self._get_instances_on_driver(context)
2013-04-25 20:48:49.401 2338 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 397, in _get_instances_on_driver
2013-04-25 20:48:49.401 2338 TRACE nova driver_uuids = self.driver.list_instance_uuids()
2013-04-25 20:48:49.401 2338 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 681, in list_instance_uuids
2013-04-25 20:48:49.401 2338 TRACE nova for name in self.list_instances()]
2013-04-25 20:48:49.401 2338 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 663, in list_instances
2013-04-25 20:48:49.401 2338 TRACE nova for domain_id in self.list_instance_ids():
2013-04-25 20:48:49.401 2338 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 657, in list_instance_ids
2013-04-25 20:48:49.401 2338 TRACE nova if self._conn.numOfDomains() == 0:
2013-04-25 20:48:49.401 2338 TRACE nova AttributeError: 'NoneType' object has no attribute 'numOfDomains'
2013-04-25 20:48:49.401 2338 TRACE nova

Tags: 13.04 ubuntu
Revision history for this message
Scott Moser (smoser) wrote :
Revision history for this message
Andre Stephens (andre-stephens) wrote :

I had the same issue too. I resolved it by doing the following:

apt-get purge libvirt-bin pm-utils
apt-get install -y kvm libvirt-bin pm-utils
service libvirt-bin restart
apt-get install nova-network nova-api-metadata nova-compute-kvm
cd /etc/init.d/; for i in $(ls nova-*); do sudo service $i restart; don

Revision history for this message
Thierry Carrez (ttx) wrote :

Looks like an Ubuntu packaging upgrade issue -- please reopen upstream task if you can point to an upstream bug

Changed in nova:
status: New → Invalid
Changed in nova (Ubuntu):
status: New → Confirmed
importance: Undecided → High
Revision history for this message
davisvictor (dvsvictor) wrote :

I have the same problem.

I am using your step-by-step, Msekni.

Revision history for this message
James Page (james-page) wrote :

13.04 is no longer supported; marking 'Won't Fix'

Changed in nova (Ubuntu):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.