From 2b7d5c783a330fbf5a54cd5f63dbf5f1004c6103 Mon Sep 17 00:00:00 2001 From: Rafi Khardalian Date: Tue, 14 Aug 2012 20:41:23 +0000 Subject: Revert to prior method of executing a libvirt hard_reboot. Fixes bug 1036826. Using reset for hard_reboot is not reliable, even where it is supported by libvirt. Hard reboots are one of the only ways to recover a VM in a broken state. The reset command assumes the domain is running in some capacity and will fail if it is not. Hard reset is the current sledgehammer for fixing issues and it really needs to stay that way. Change-Id: I84705b72d79cf71adad066b18267fdfb199bc9cb --- nova/virt/libvirt/driver.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/nova/virt/libvirt/driver.py b/nova/virt/libvirt/driver.py index 6abce222d..8d3a36405 100644 --- a/nova/virt/libvirt/driver.py +++ b/nova/virt/libvirt/driver.py @@ -876,12 +876,8 @@ class LibvirtDriver(driver.ComputeDriver): if not xml: xml = virt_dom.XMLDesc(0) - # NOTE(dprince): reset was added in Libvirt 0.9.7 - if hasattr(virt_dom, 'reset'): - virt_dom.reset(0) - else: - self._destroy(instance) - self._create_domain(xml, virt_dom) + self._destroy(instance) + self._create_domain(xml, virt_dom) def _wait_for_reboot(): """Called at an interval until the VM is running again.""" -- cgit