mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-10147 Disabled Xenserver Cluster can still deploy VM's. Added code to skip disabled clusters when selecting a host (#2442)
This commit is contained in:
parent
521e71fbeb
commit
c3488a51db
|
|
@ -1040,6 +1040,11 @@ StateListener<State, VirtualMachine.Event, VirtualMachine> {
|
|||
for (Long clusterId : clusterList) {
|
||||
ClusterVO clusterVO = _clusterDao.findById(clusterId);
|
||||
|
||||
if (clusterVO.getAllocationState() == Grouping.AllocationState.Disabled) {
|
||||
s_logger.debug("Cannot deploy in disabled cluster " + clusterId + ", skipping this cluster");
|
||||
avoid.addCluster(clusterVO.getId());
|
||||
}
|
||||
|
||||
if (clusterVO.getHypervisorType() != vmProfile.getHypervisorType()) {
|
||||
s_logger.debug("Cluster: " + clusterId + " has HyperVisorType that does not match the VM, skipping this cluster");
|
||||
avoid.addCluster(clusterVO.getId());
|
||||
|
|
|
|||
Loading…
Reference in New Issue