diff options
| author | Sandy Walsh <sandy.walsh@rackspace.com> | 2011-09-12 07:36:14 -0700 |
|---|---|---|
| committer | Sandy Walsh <sandy.walsh@rackspace.com> | 2011-09-12 07:36:14 -0700 |
| commit | 043a13690dc4f2ba20965cced85d705e59f7406b (patch) | |
| tree | d385fe22f81b435e8cb56a774f5244db7b45637c /nova/compute | |
| parent | a27aa5dce2788560b29fd33b4805acf0190a27e3 (diff) | |
| parent | 66dd77887641f9db5f690f871b0cfb4d381d6a3e (diff) | |
bug fixes
Diffstat (limited to 'nova/compute')
| -rw-r--r-- | nova/compute/api.py | 11 | ||||
| -rw-r--r-- | nova/compute/manager.py | 4 |
2 files changed, 7 insertions, 8 deletions
diff --git a/nova/compute/api.py b/nova/compute/api.py index 4e2944bb7..7211c2cf0 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -908,10 +908,8 @@ class API(base.Base): if not recurse_zones: return instances - # Recurse zones. Need admin context for this. Send along - # the un-modified search options we received.. - admin_context = context.elevated() - children = scheduler_api.call_zone_method(admin_context, + # Recurse zones. Send along the un-modified search options we received. + children = scheduler_api.call_zone_method(context, "list", errors_to_ignore=[novaclient.exceptions.NotFound], novaclient_collection_name="servers", @@ -1042,13 +1040,14 @@ class API(base.Base): return recv_meta @scheduler_api.reroute_compute("reboot") - def reboot(self, context, instance_id): + def reboot(self, context, instance_id, reboot_type): """Reboot the given instance.""" self.update(context, instance_id, vm_state=vm_states.ACTIVE, task_state=task_states.REBOOTING) - self._cast_compute_message('reboot_instance', context, instance_id) + self._cast_compute_message('reboot_instance', context, instance_id, + reboot_type) @scheduler_api.reroute_compute("rebuild") def rebuild(self, context, instance_id, image_href, admin_password, diff --git a/nova/compute/manager.py b/nova/compute/manager.py index 0477db745..0be12297f 100644 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -579,7 +579,7 @@ class ComputeManager(manager.SchedulerDependentManager): @exception.wrap_exception(notifier=notifier, publisher_id=publisher_id()) @checks_instance_lock - def reboot_instance(self, context, instance_id): + def reboot_instance(self, context, instance_id, reboot_type="SOFT"): """Reboot an instance on this host.""" LOG.audit(_("Rebooting instance %s"), instance_id, context=context) context = context.elevated() @@ -601,7 +601,7 @@ class ComputeManager(manager.SchedulerDependentManager): context=context) network_info = self._get_instance_nw_info(context, instance_ref) - self.driver.reboot(instance_ref, network_info) + self.driver.reboot(instance_ref, network_info, reboot_type) current_power_state = self._get_power_state(context, instance_ref) self._instance_update(context, |
