weizhouapache commented on code in PR #8234:
URL: https://github.com/apache/cloudstack/pull/8234#discussion_r1492949837


##########
server/src/main/java/com/cloud/vm/UserVmManagerImpl.java:
##########
@@ -1892,7 +1925,11 @@ public UserVm upgradeVirtualMachine(ScaleVMCmd cmd) 
throws ResourceUnavailableEx
         }
         CallContext.current().setEventDetails("Vm Id: " + vm.getUuid());
 
-        boolean result = upgradeVirtualMachine(vmId, newServiceOfferingId, 
cmd.getDetails());
+        Map<String, String> cmdDetails = cmd.getDetails();
+
+        updateInstanceDetails(cmdDetails, vm, newServiceOfferingId);
+
+        boolean result = upgradeVirtualMachine(vmId, newServiceOfferingId, 
cmdDetails);

Review Comment:
   Sorry for late review.
   
   @GaOrtiga 
   if the upgrade fail, should the details be restored to the original values ?
   
   ping @DaanHoogland @GutoVeronezi , anyone has tested it ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to