DaanHoogland commented on code in PR #8085:
URL: https://github.com/apache/cloudstack/pull/8085#discussion_r1363613454


##########
engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java:
##########
@@ -1443,6 +1443,15 @@ public void orchestrateStart(final String vmUuid, final 
Map<VirtualMachineProfil
                 }
                 if (canRetry) {
                     try {
+                        // Setting pod id to null can result in migration of 
Volumes across pods. This is not desirable for VMs which
+                        // have a volume in Ready state (happens when a VM is 
shutdown and started again).
+                        //
+                        // So, we set it to null only when
+                        //   migration of volumes across cluster is enabled
+                        //   Or, volumes are still in allocated state for that 
VM (happens when VM is Starting/deployed for the first time)
+                        if 
(MIGRATE_VM_ACROSS_CLUSTERS.valueIn(vm.getDataCenterId()) || 
areAllVolumesAllocated(vm.getId())) {
+                            vm.setPodIdToDeployIn(null);

Review Comment:
   shall we make this a method and add the comment as javadoc?



-- 
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