[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-10147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16397205#comment-16397205
 ] 

ASF GitHub Bot commented on CLOUDSTACK-10147:
---------------------------------------------

rafaelweingartner 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<Long> 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


> Disabled Xenserver cluster can still deploy VMs 
> ------------------------------------------------
>
>                 Key: CLOUDSTACK-10147
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10147
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>          Components: Management Server, UI
>    Affects Versions: 4.10.0.0, 4.9.2.0
>         Environment: Xenserver 6.2, 7
>            Reporter: Glenn Wagner
>            Assignee: Henko Holtzhausen
>            Priority: Major
>
> ENVIRONMENT 
> ===================== 
> XenServer Version : 6.2 , 7
> ISSUE 
> ================== 
> Disabled Xenserver Cluster can still deploy VM's , hosts in the cluster are 
> still active  
> Repro. steps followed 
> ================== 
> Disabled Cluster from UI. 
> Deploy a new VM 
> Expected Behavior 
> ===============
> After disabling the cluster , the hosts should be disabled. and no VM's can 
> be deployed 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to