GabrielBrascher commented on a change in pull request #3600:
URL: https://github.com/apache/cloudstack/pull/3600#discussion_r521181416



##########
File path: 
server/src/main/java/com/cloud/deploy/DeploymentPlanningManagerImpl.java
##########
@@ -574,6 +580,80 @@ private boolean 
getDisplayStorageFromVmProfile(VirtualMachineProfile vmProfile)
         return vmProfile == null || vmProfile.getTemplate() == null || 
!vmProfile.getTemplate().isDeployAsIs();
     }
 
+        /**
+         * Adds disabled resources (Data centers, Pods, Clusters, and hosts) 
to exclude list (avoid) in case of disabled state.
+         */
+        public void avoidDisabledResources(VirtualMachineProfile vmProfile, 
DataCenter dc, ExcludeList avoids) {
+            if (vmProfile.getType().isUsedBySystem() && 
isRouterDeployableInDisabledResources()) {
+                return;
+            }
+
+            VMInstanceVO vm = _vmInstanceDao.findById(vmProfile.getId());
+            AccountVO owner = accountDao.findById(vm.getAccountId());
+            if (owner.getRoleId() == ADMIN_ACCOUNT_ROLE_ID && 
isAdminVmDeployableInDisabledResources()) {

Review comment:
       @DaanHoogland the problem raised by the tests is due to the fact that 
the role ID of a project is null; thus, these tests are failing.
   
   Tests that failed:
   /marvin/tests/smoke/test_affinity_groups_projects.py
   /marvin/tests/smoke/test_kubernetes_clusters.py
   /marvin/tests/smoke/test_projects.py
   I am going to take a look at a fix for it, not sure if this will be on 4.15 
then. Is there an ETA for 4.15?
   




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

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


Reply via email to