mirror of https://github.com/apache/cloudstack.git
Update usage when scaling vms (#7011)
This commit is contained in:
parent
73a610da94
commit
4133f0e979
|
|
@ -4573,12 +4573,12 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
|
|||
throw new CloudRuntimeException("Unable to scale vm due to " + (reconfigureAnswer == null ? "" : reconfigureAnswer.getDetails()));
|
||||
}
|
||||
|
||||
upgradeVmDb(vm.getId(), newServiceOffering, oldServiceOffering);
|
||||
|
||||
if (vm.getType().equals(VirtualMachine.Type.User)) {
|
||||
_userVmMgr.generateUsageEvent(vm, vm.isDisplayVm(), EventTypes.EVENT_VM_DYNAMIC_SCALE);
|
||||
}
|
||||
|
||||
upgradeVmDb(vm.getId(), newServiceOffering, oldServiceOffering);
|
||||
|
||||
if (reconfiguringOnExistingHost) {
|
||||
vm.setServiceOfferingId(oldServiceOffering.getId());
|
||||
_capacityMgr.releaseVmCapacity(vm, false, false, vm.getHostId());
|
||||
|
|
|
|||
Loading…
Reference in New Issue