Skip to content

Commit c3488a5

Browse files
houthuisrafaelweingartner
authored andcommitted
CLOUDSTACK-10147 Disabled Xenserver Cluster can still deploy VM's. Added code to skip disabled clusters when selecting a host (#2442)
1 parent 521e71f commit c3488a5

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

server/src/main/java/com/cloud/deploy/DeploymentPlanningManagerImpl.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,6 +1040,11 @@ private DeployDestination checkClustersforDestination(List<Long> clusterList, Vi
10401040
for (Long clusterId : clusterList) {
10411041
ClusterVO clusterVO = _clusterDao.findById(clusterId);
10421042

1043+
if (clusterVO.getAllocationState() == Grouping.AllocationState.Disabled) {
1044+
s_logger.debug("Cannot deploy in disabled cluster " + clusterId + ", skipping this cluster");
1045+
avoid.addCluster(clusterVO.getId());
1046+
}
1047+
10431048
if (clusterVO.getHypervisorType() != vmProfile.getHypervisorType()) {
10441049
s_logger.debug("Cluster: " + clusterId + " has HyperVisorType that does not match the VM, skipping this cluster");
10451050
avoid.addCluster(clusterVO.getId());

0 commit comments

Comments
 (0)