mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-23 05:04:56 +09:00
1 parent
3a1aa0c855
commit
ea33ca4c77
1 file changed
+8
-1
@@ -211,6 +211,8 @@ void DispatchManager::poweroff_success_action(int vid)
|
||||
return;
|
||||
}
|
||||
|
||||
VirtualMachine::LcmState prev_state = vm->get_lcm_state();
|
||||
|
||||
if ((vm->get_state() == VirtualMachine::ACTIVE) &&
|
||||
(vm->get_lcm_state() == VirtualMachine::SHUTDOWN_POWEROFF ||
|
||||
vm->get_lcm_state() == VirtualMachine::HOTPLUG_PROLOG_POWEROFF ||
|
||||
@@ -247,7 +249,12 @@ void DispatchManager::poweroff_success_action(int vid)
|
||||
|
||||
vm->unlock();
|
||||
|
||||
Quotas::vm_del(uid, gid, "a_tmpl);
|
||||
if (prev_state != VirtualMachine::DISK_SNAPSHOT_POWEROFF &&
|
||||
prev_state != VirtualMachine::DISK_SNAPSHOT_REVERT_POWEROFF &&
|
||||
prev_state != VirtualMachine::DISK_SNAPSHOT_DELETE_POWEROFF)
|
||||
{
|
||||
Quotas::vm_del(uid, gid, "a_tmpl);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user