From 229ca4be3fe566083b593fd94e2fd60ab8dba024 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn?= Date: Fri, 22 Apr 2016 18:00:56 +0200 Subject: [PATCH] Feature #4320: Do not allow vm.updateconf in stopped state --- src/vm/VirtualMachine.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/vm/VirtualMachine.cc b/src/vm/VirtualMachine.cc index 4b12d5ea32..316c31c7be 100644 --- a/src/vm/VirtualMachine.cc +++ b/src/vm/VirtualMachine.cc @@ -4860,7 +4860,6 @@ int VirtualMachine::updateconf(VirtualMachineTemplate& tmpl, string &err) { case PENDING: case HOLD: - case STOPPED: case POWEROFF: case UNDEPLOYED: case CLONING: @@ -4872,8 +4871,6 @@ int VirtualMachine::updateconf(VirtualMachineTemplate& tmpl, string &err) { case LCM_INIT: case PROLOG: - case SAVE_STOP: - case EPILOG_STOP: case EPILOG: case SHUTDOWN: case CLEANUP_RESUBMIT: @@ -4888,7 +4885,6 @@ int VirtualMachine::updateconf(VirtualMachineTemplate& tmpl, string &err) case BOOT_FAILURE: case PROLOG_FAILURE: case EPILOG_FAILURE: - case EPILOG_STOP_FAILURE: case EPILOG_UNDEPLOY_FAILURE: case PROLOG_MIGRATE_POWEROFF: case PROLOG_MIGRATE_POWEROFF_FAILURE: @@ -4907,6 +4903,8 @@ int VirtualMachine::updateconf(VirtualMachineTemplate& tmpl, string &err) case INIT: case DONE: case SUSPENDED: + case STOPPED: + err = "configuration cannot be update in state " + state_str(); return -1; }