From 9a9822a284256405ce92aeec77d1a99ac81d51be Mon Sep 17 00:00:00 2001 From: "Ruben S. Montero" Date: Mon, 17 May 2021 12:21:34 +0200 Subject: [PATCH] M #-: Fix epilog transition for undeploy/stopped --- src/lcm/LifeCycleActions.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/lcm/LifeCycleActions.cc b/src/lcm/LifeCycleActions.cc index 8bae510d82..c14e53325a 100644 --- a/src/lcm/LifeCycleActions.cc +++ b/src/lcm/LifeCycleActions.cc @@ -514,7 +514,15 @@ void LifeCycleManager::trigger_shutdown(int vid, bool hard, vm->get_state() == VirtualMachine::UNDEPLOYED) { vm->set_state(VirtualMachine::ACTIVE); - vm->set_state(VirtualMachine::EPILOG); + + if ( vm->get_state() == VirtualMachine::STOPPED ) + { + vm->set_state(VirtualMachine::EPILOG_STOP); + } + else // if ( vm->get_state() == VirtualMachine::UNDEPLOYED ) + { + vm->set_state(VirtualMachine::EPILOG_UNDEPLOY); + } Quotas::vm_check(uid, gid, "a_tmpl, error);