mirror of https://github.com/apache/cloudstack.git
Bug 9273 : resource counts going -ve
Fixing resource count getting -ve assert. resource count should not be decremented for system VM's.
This commit is contained in:
parent
edda8e8032
commit
3a1fe780cf
|
|
@ -728,7 +728,9 @@ public class VirtualMachineManagerImpl implements VirtualMachineManager, Listene
|
|||
}
|
||||
} finally {
|
||||
if (startedVm == null) {
|
||||
_accountMgr.decrementResourceCount(vm.getAccountId(), ResourceType.user_vm);
|
||||
if(vm.getType().equals(VirtualMachine.Type.User)) {
|
||||
_accountMgr.decrementResourceCount(vm.getAccountId(), ResourceType.user_vm);
|
||||
}
|
||||
changeState(vm, Event.OperationFailed, null, work, Step.Done);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue