From a69251804e62f871f93ffa420978f9b61a36df9c Mon Sep 17 00:00:00 2001 From: Rafi Khardalian Date: Fri, 18 Jan 2013 07:01:50 +0000 Subject: Relax API restrictions around the use of reboot Fixes bug 1101082 bug 982108 Reboots are the only sledge hammer users have available to resolve issues with their instances without administrative intervention. This patch modifies the API policy to allow reboot calls to be made in many more power and task states. Change-Id: Ia8702448f6b7b863da40e4d498f2e2ee0a12882e --- nova/compute/api.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/nova/compute/api.py b/nova/compute/api.py index 06ce2e07e..6e9119f51 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -1591,8 +1591,14 @@ class API(base.Base): @wrap_check_policy @check_instance_lock @check_instance_state(vm_state=[vm_states.ACTIVE, vm_states.STOPPED, - vm_states.RESCUED], - task_state=[None, task_states.REBOOTING]) + vm_states.RESCUED, vm_states.PAUSED, + vm_states.SUSPENDED], + task_state=[None, task_states.REBOOTING, + task_states.REBOOTING_HARD, + task_states.RESUMING, + task_states.UNPAUSING, + task_states.PAUSING, + task_states.SUSPENDING]) def reboot(self, context, instance, reboot_type): """Reboot the given instance.""" if (reboot_type == 'SOFT' and -- cgit