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


##########
server/src/main/java/com/cloud/deploy/DeploymentPlanningManagerImpl.java:
##########
@@ -1083,13 +1086,61 @@ private void findAvoiSetForRouterVM(ExcludeList avoids, 
VirtualMachine vm, List<
     }
 
     private void findAvoidSetForNonExplicitUserVM(ExcludeList avoids, 
VirtualMachine vm, List<Long> allPodsInDc, List<Long> allClustersInDc, 
List<Long> allHostsInDc) {
+        if (allPodsInDc.isEmpty() && allClustersInDc.isEmpty() && 
allHostsInDc.isEmpty()) {
+            // Nothing in this DC is dedicated to anyone, so there is nothing 
to avoid or to check dedication for.
+            return;
+        }
+
+        long vmAccountId = vm.getAccountId();
+        long vmDomainId = vm.getDomainId();
+
+        // If the VM owner's domain has an ExplicitDedication domain-level 
affinity group,
+        // resources dedicated to that domain are accessible to the VM owner 
as well.
+        boolean hasDomainExplicitDedicationGroup =
+                _affinityGroupDao.findDomainLevelGroupByType(vmDomainId, 
EXPLICIT_DEDICATION_AFFINITY_GROUP_TYPE) != null;

Review Comment:
   @Pearl1594 can you look at a9c6daf0376d674c8f5b8bbc62c935e2c4246ed4?



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