mirror of https://github.com/apache/cloudstack.git
server: fix resource count updated unmanage vm (#8169)
Do not decrement resource count for a running VM twice while unmanaging a VM
This commit is contained in:
parent
52247c57bb
commit
7a8066d3ca
|
|
@ -8452,9 +8452,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir
|
|||
UsageEventUtils.publishUsageEvent(EventTypes.EVENT_VM_STOP, vm.getAccountId(), vm.getDataCenterId(),
|
||||
vm.getId(), vm.getHostName(), vm.getServiceOfferingId(), vm.getTemplateId(),
|
||||
vm.getHypervisorType().toString(), VirtualMachine.class.getName(), vm.getUuid(), vm.isDisplayVm());
|
||||
resourceCountDecrement(vm.getAccountId(), vm.isDisplayVm(), cpu, ram);
|
||||
}
|
||||
|
||||
// VM destroy usage event
|
||||
UsageEventUtils.publishUsageEvent(EventTypes.EVENT_VM_DESTROY, vm.getAccountId(), vm.getDataCenterId(),
|
||||
vm.getId(), vm.getHostName(), vm.getServiceOfferingId(), vm.getTemplateId(),
|
||||
|
|
|
|||
Loading…
Reference in New Issue