Skip to content

Instantly share code, notes, and snippets.

@vishvananda
Created October 20, 2011 21:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vishvananda/1302415 to your computer and use it in GitHub Desktop.
Save vishvananda/1302415 to your computer and use it in GitHub Desktop.
commit 7ac94ccf7dbb5838ef877b9d954ea96bf1412b4b
Author: Anthony Young <sleepsonthefloor@gmail.com>
Date: Mon Sep 12 00:16:49 2011 -0700
fix for lp847604 to unbreak instance rebooting
diff --git a/nova/compute/api.py b/nova/compute/api.py
index b0ea044..48bb266 100644
--- a/nova/compute/api.py
+++ b/nova/compute/api.py
@@ -1049,7 +1049,7 @@ class API(base.Base):
vm_state=vm_states.ACTIVE,
task_state=task_states.REBOOTING)
self._cast_compute_message('reboot_instance', context, instance_id,
- reboot_type)
+ params={'reboot_type': reboot_type})
@scheduler_api.reroute_compute("rebuild")
def rebuild(self, context, instance_id, image_href, admin_password,
diff --git a/nova/virt/libvirt/connection.py b/nova/virt/libvirt/connection.py
index 19cef5a..fb2aed6 100644
--- a/nova/virt/libvirt/connection.py
+++ b/nova/virt/libvirt/connection.py
@@ -466,7 +466,7 @@ class LibvirtConnection(driver.ComputeDriver):
shutil.rmtree(temp_dir)
@exception.wrap_exception()
- def reboot(self, instance, network_info):
+ def reboot(self, instance, network_info, reboot_type):
"""Reboot a virtual machine, given an instance reference.
This method actually destroys and re-creates the domain to ensure the
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment