summaryrefslogtreecommitdiffstats
path: root/nova
diff options
context:
space:
mode:
authorRafi Khardalian <rafi@metacloud.com>2012-08-14 20:41:23 +0000
committerRafi Khardalian <rafi@metacloud.com>2012-08-14 21:29:41 +0000
commit2b7d5c783a330fbf5a54cd5f63dbf5f1004c6103 (patch)
treebb4fac962b577e502355de1c2aba108573ee3538 /nova
parent275b97a33a843be620cd348796c1d1aac72f007b (diff)
downloadnova-2b7d5c783a330fbf5a54cd5f63dbf5f1004c6103.tar.gz
nova-2b7d5c783a330fbf5a54cd5f63dbf5f1004c6103.tar.xz
nova-2b7d5c783a330fbf5a54cd5f63dbf5f1004c6103.zip
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
Diffstat (limited to 'nova')
-rw-r--r--nova/virt/libvirt/driver.py8
1 files 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."""