You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by da...@apache.org on 2022/12/31 13:49:30 UTC
[cloudstack] branch main updated: Update usage when scaling vms (#7011)
This is an automated email from the ASF dual-hosted git repository.
dahn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/main by this push:
new 4133f0e9799 Update usage when scaling vms (#7011)
4133f0e9799 is described below
commit 4133f0e9799203299bd18b30273a208d63625b49
Author: João Jandre <48...@users.noreply.github.com>
AuthorDate: Sat Dec 31 10:48:36 2022 -0300
Update usage when scaling vms (#7011)
---
.../src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java b/engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java
index d9117703751..fe1829853b4 100755
--- a/engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java
+++ b/engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java
@@ -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());