nimbusproject/nimbus — Issue #82: KVM reboot failures are not gracefully handled
Author: labisso
Created: 2011-11-30 17:19:37+00:00
State: open

KVM/libvirt VM reboot support didn't come along until relatively recent, in libvirt 0.9.3. Prior to this Nimbus' attempt to reboot a KVM VM would result in an error from libvirt that caused the VM to be considered CORRUPT:

File "/usr/lib64/python2.4/site-packages/libvirt.py", line 392, in reboot
if ret == -1: raise libvirtError ('virDomainReboot() failed', dom=self)
libvirtError: this function is not supported by the hypervisor: virDomainReboot
2011-11-30 10:14:27,758 - ERROR - Problem rebooting the 'wrksp-8628' VM: this function is not supported by the hypervisor: virDomainReboot
Traceback (most recent call last):
File "/opt/nimbus/src/python/workspacecontrol/main/wc_core.py", line 79, in core
_core(vm_name, action, p, c)
File "/opt/nimbus/src/python/workspacecontrol/main/wc_core.py", line 239, in _core
platform.reboot(running_vm)
File "/opt/nimbus/src/python/workspacecontrol/defaults/lvrt/lvrt_common.py", line 164, in reboot
raise UnexpectedError(shorterr)
UnexpectedError: Problem rebooting the 'wrksp-8628' VM: this function is not supported by the hypervisor: virDomainReboot
Problem executing: Problem rebooting the 'wrksp-8628' VM: this function is not supported by the hypervisor: virDomainReboot

If possible Nimbus should catch this error return it to the user, but leave the VM in a healthy state.