This is an automated email from the ASF dual-hosted git repository.
rafael pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/master by this push:
new c3488a5 CLOUDSTACK-10147 Disabled Xenserver Cluster can still deploy
VM's. Added code to skip disabled clusters when selecting a host (#2442)
c3488a5 is described below
commit c3488a51db4bce4ec32c09e6fef78193d360cf3f
Author: Henko <[email protected]>
AuthorDate: Tue Mar 13 18:27:51 2018 +0200
CLOUDSTACK-10147 Disabled Xenserver Cluster can still deploy VM's. Added
code to skip disabled clusters when selecting a host (#2442)
---
.../main/java/com/cloud/deploy/DeploymentPlanningManagerImpl.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git
a/server/src/main/java/com/cloud/deploy/DeploymentPlanningManagerImpl.java
b/server/src/main/java/com/cloud/deploy/DeploymentPlanningManagerImpl.java
index cc244ce..5d8ad0a 100644
--- a/server/src/main/java/com/cloud/deploy/DeploymentPlanningManagerImpl.java
+++ b/server/src/main/java/com/cloud/deploy/DeploymentPlanningManagerImpl.java
@@ -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());
--
To stop receiving notification emails like this one, please contact
[email protected].