sureshanaparti commented on code in PR #12994:
URL: https://github.com/apache/cloudstack/pull/12994#discussion_r3062645131


##########
server/src/main/java/org/apache/cloudstack/cluster/ClusterDrsServiceImpl.java:
##########
@@ -633,12 +635,20 @@ Pair<VirtualMachine, Host> getBestMigration(Cluster 
cluster, ClusterDrsAlgorithm
         return bestMigration;
     }
 
-    private boolean skipDrs(VirtualMachine vm, List<? extends Host> 
compatibleHosts, ServiceOffering serviceOffering) {
+    private boolean shouldSkipVMForDRS(VirtualMachine vm) {
         if (vm.getType().isUsedBySystem() || vm.getState() != 
VirtualMachine.State.Running) {
             return true;
         }
-        if (MapUtils.isNotEmpty(vm.getDetails()) &&
-            
"true".equalsIgnoreCase(vm.getDetails().get(VmDetailConstants.SKIP_DRS))) {
+
+        UserVmDetailVO skipDrsDetail = userVmdetailsDao.findDetail(vm.getId(), 
VmDetailConstants.SKIP_DRS);
+        if (skipDrsDetail != null && 
skipDrsDetail.getValue().equalsIgnoreCase("true")) {

Review Comment:
   ```suggestion
           if (skipDrsDetail != null && 
"true".equalsIgnoreCase(skipDrsDetail.getValue())) {
   ```



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