[GitHub] houthuis closed pull request #2442: CLOUDSTACK-10147 Disabled Xenserver Cluster can still deploy VM's

2018-02-02 Thread GitBox
houthuis closed pull request #2442: CLOUDSTACK-10147 Disabled Xenserver Cluster 
can still deploy VM's
URL: https://github.com/apache/cloudstack/pull/2442
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/server/src/main/java/com/cloud/deploy/DeploymentPlanningManagerImpl.java 
b/server/src/main/java/com/cloud/deploy/DeploymentPlanningManagerImpl.java
index cc244ce41ba..5d8ad0a7051 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 @@ private DeployDestination 
checkClustersforDestination(List clusterList, Vi
 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());


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] houthuis closed pull request #2442: CLOUDSTACK-10147 Disabled Xenserver Cluster can still deploy VM's

2018-02-02 Thread GitBox
houthuis closed pull request #2442: CLOUDSTACK-10147 Disabled Xenserver Cluster 
can still deploy VM's
URL: https://github.com/apache/cloudstack/pull/2442
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/server/src/main/java/com/cloud/deploy/DeploymentPlanningManagerImpl.java 
b/server/src/main/java/com/cloud/deploy/DeploymentPlanningManagerImpl.java
index cc244ce41ba..5d8ad0a7051 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 @@ private DeployDestination 
checkClustersforDestination(List clusterList, Vi
 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());


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] houthuis closed pull request #2442: CLOUDSTACK-10147 Disabled Xenserver Cluster can still deploy VM's

2018-02-02 Thread GitBox
houthuis closed pull request #2442: CLOUDSTACK-10147 Disabled Xenserver Cluster 
can still deploy VM's
URL: https://github.com/apache/cloudstack/pull/2442
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/server/src/main/java/com/cloud/deploy/DeploymentPlanningManagerImpl.java 
b/server/src/main/java/com/cloud/deploy/DeploymentPlanningManagerImpl.java
index cc244ce41ba..5d8ad0a7051 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 @@ private DeployDestination 
checkClustersforDestination(List clusterList, Vi
 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());


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services