nimbusproject / nimbus

Nimbus - Open Source Cloud Computing Software - 100% Apache2 licensed
http://www.nimbusproject.org/
197 stars 82 forks source link

KVM reboot failures are not gracefully handled #82

Closed labisso closed 12 years ago

labisso commented 12 years ago

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.