I was running into a exception when trying to reboot(automatically) all vm instances after the compute node failover(nova version is Diablo);
this code piece maybe related:
nova/virt/libvirt/connection.py:501
virt_dom = self._conn.lookupByName(instance['name'])
on the newly up host, there is no virt Domain, the above lookupByName would definitely failed and throw a exception;
to put this calling in a `try exception' may be better.
detailed trace:
2012-07-18 15:55:09,422 CRITICAL nova [-] Domain not found: no domain with matching name 'instance-0000007a'
(nova): TRACE: Traceback (most recent call last):
(nova): TRACE: File "/usr/bin/nova-compute", line 49, in <module>
(nova): TRACE: service.wait()
(nova): TRACE: File "/usr/lib/python2.7/dist-packages/nova/service.py", line 357, in wait
(nova): TRACE: _launcher.wait()
(nova): TRACE: File "/usr/lib/python2.7/dist-packages/nova/service.py", line 107, in wait
(nova): TRACE: service.wait()
(nova): TRACE: File "/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line 166, in wait
(nova): TRACE: return self._exit_event.wait()
(nova): TRACE: File "/usr/lib/python2.7/dist-packages/eventlet/event.py", line 116, in wait
(nova): TRACE: return hubs.get_hub().switch()
(nova): TRACE: File "/usr/lib/python2.7/dist-packages/eventlet/hubs/hub.py", line 177, in switch
(nova): TRACE: return self.greenlet.switch()
(nova): TRACE: File "/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line 192, in main
(nova): TRACE: result = function(*args, **kwargs)
(nova): TRACE: File "/usr/lib/python2.7/dist-packages/nova/service.py", line 77, in run_server
(nova): TRACE: server.start()
(nova): TRACE: File "/usr/lib/python2.7/dist-packages/nova/service.py", line 137, in start
(nova): TRACE: self.manager.init_host()
(nova): TRACE: File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 176, in init_host
(nova): TRACE: self.reboot_instance(context, instance['id'])
(nova): TRACE: File "/usr/lib/python2.7/dist-packages/nova/exception.py", line 100, in wrapped
(nova): TRACE: return f(*args, **kw)
(nova): TRACE: File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 118, in decorated_function
(nova): TRACE: function(self, context, instance_id, *args, **kwargs)
(nova): TRACE: File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 636, in reboot_instance
(nova): TRACE: self.driver.reboot(instance_ref, network_info)
(nova): TRACE: File "/usr/lib/python2.7/dist-packages/nova/exception.py", line 100, in wrapped
(nova): TRACE: return f(*args, **kw)
(nova): TRACE: File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/connection.py", line 501, in reboot
(nova): TRACE: virt_dom = self._conn.lookupByName(instance['name'])
(nova): TRACE: File "/usr/lib/python2.7/dist-packages/libvirt.py", line 1870, in lookupByName
(nova): TRACE: if ret is None:raise libvirtError('virDomainLookupByName() failed', conn=self)
(nova): TRACE: libvirtError: Domain not found: no domain with matching name 'instance-0000007a'
I was running into a exception when trying to reboot( automatically) all vm instances after the compute node failover(nova version is Diablo);
this code piece maybe related: libvirt/ connection. py:501 lookupByName( instance[ 'name'] )
nova/virt/
virt_dom = self._conn.
on the newly up host, there is no virt Domain, the above lookupByName would definitely failed and throw a exception;
to put this calling in a `try exception' may be better.
detailed trace:
2012-07-18 15:55:09,422 CRITICAL nova [-] Domain not found: no domain with matching name 'instance-0000007a' nova-compute" , line 49, in <module> python2. 7/dist- packages/ nova/service. py", line 357, in wait python2. 7/dist- packages/ nova/service. py", line 107, in wait python2. 7/dist- packages/ eventlet/ greenthread. py", line 166, in wait event.wait( ) python2. 7/dist- packages/ eventlet/ event.py" , line 116, in wait hub().switch( ) python2. 7/dist- packages/ eventlet/ hubs/hub. py", line 177, in switch switch( ) python2. 7/dist- packages/ eventlet/ greenthread. py", line 192, in main python2. 7/dist- packages/ nova/service. py", line 77, in run_server python2. 7/dist- packages/ nova/service. py", line 137, in start init_host( ) python2. 7/dist- packages/ nova/compute/ manager. py", line 176, in init_host instance( context, instance['id']) python2. 7/dist- packages/ nova/exception. py", line 100, in wrapped python2. 7/dist- packages/ nova/compute/ manager. py", line 118, in decorated_function python2. 7/dist- packages/ nova/compute/ manager. py", line 636, in reboot_instance reboot( instance_ ref, network_info) python2. 7/dist- packages/ nova/exception. py", line 100, in wrapped python2. 7/dist- packages/ nova/virt/ libvirt/ connection. py", line 501, in reboot lookupByName( instance[ 'name'] ) python2. 7/dist- packages/ libvirt. py", line 1870, in lookupByName 'virDomainLooku pByName( ) failed', conn=self)
(nova): TRACE: Traceback (most recent call last):
(nova): TRACE: File "/usr/bin/
(nova): TRACE: service.wait()
(nova): TRACE: File "/usr/lib/
(nova): TRACE: _launcher.wait()
(nova): TRACE: File "/usr/lib/
(nova): TRACE: service.wait()
(nova): TRACE: File "/usr/lib/
(nova): TRACE: return self._exit_
(nova): TRACE: File "/usr/lib/
(nova): TRACE: return hubs.get_
(nova): TRACE: File "/usr/lib/
(nova): TRACE: return self.greenlet.
(nova): TRACE: File "/usr/lib/
(nova): TRACE: result = function(*args, **kwargs)
(nova): TRACE: File "/usr/lib/
(nova): TRACE: server.start()
(nova): TRACE: File "/usr/lib/
(nova): TRACE: self.manager.
(nova): TRACE: File "/usr/lib/
(nova): TRACE: self.reboot_
(nova): TRACE: File "/usr/lib/
(nova): TRACE: return f(*args, **kw)
(nova): TRACE: File "/usr/lib/
(nova): TRACE: function(self, context, instance_id, *args, **kwargs)
(nova): TRACE: File "/usr/lib/
(nova): TRACE: self.driver.
(nova): TRACE: File "/usr/lib/
(nova): TRACE: return f(*args, **kw)
(nova): TRACE: File "/usr/lib/
(nova): TRACE: virt_dom = self._conn.
(nova): TRACE: File "/usr/lib/
(nova): TRACE: if ret is None:raise libvirtError(
(nova): TRACE: libvirtError: Domain not found: no domain with matching name 'instance-0000007a'