From 3a4d70e69601a6441a6a237517c92e616672a32c Mon Sep 17 00:00:00 2001 From: Rajesh Battala Date: Mon, 17 Nov 2014 16:05:32 +0530 Subject: [PATCH] Revert "Merge branch 'CLOUDSTACK-7703' of https://github.com/anshul1886/cloudstack-1" This reverts commit d5b6fc4f04450bb2ff733f2eaf1ae800578be567, reversing changes made to 91ffaaa5a2163b2b62868097dea587bd712061d8. --- .../deploy/DeploymentPlanningManagerImpl.java | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java b/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java index 6b80dbad1cd..bfb33b0c624 100755 --- a/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java +++ b/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java @@ -31,6 +31,7 @@ import javax.ejb.Local; import javax.inject.Inject; import javax.naming.ConfigurationException; +import com.cloud.utils.fsm.StateMachine2; import org.apache.log4j.Logger; import org.apache.cloudstack.affinity.AffinityGroupProcessor; @@ -120,7 +121,6 @@ import com.cloud.utils.db.TransactionCallback; import com.cloud.utils.db.TransactionStatus; import com.cloud.utils.exception.CloudRuntimeException; import com.cloud.utils.fsm.StateListener; -import com.cloud.utils.fsm.StateMachine2; import com.cloud.vm.DiskProfile; import com.cloud.vm.VMInstanceVO; import com.cloud.vm.VirtualMachine; @@ -990,10 +990,7 @@ StateListener { // if all hosts or all pools in the cluster are in avoid set after this // pass, then put the cluster in avoid set. - boolean avoidAllHosts = true; - boolean avoidAllPools = true; - boolean avoidAllLocalPools = true; - boolean avoidAllSharedPools = true; + boolean avoidAllHosts = true, avoidAllPools = true; List allhostsInCluster = _hostDao.listAllUpAndEnabledNonHAHosts(Host.Type.Routing, clusterVO.getId(), clusterVO.getPodId(), clusterVO.getDataCenterId(), null); @@ -1027,7 +1024,7 @@ StateListener { for (StoragePoolVO pool : allPoolsInCluster) { if (!allocatorAvoidOutput.shouldAvoid(pool)) { // there's some pool in the cluster that is not yet in avoid set - avoidAllSharedPools = false; + avoidAllPools = false; break; } } @@ -1041,19 +1038,11 @@ StateListener { if (!allocatorAvoidOutput.shouldAvoid(pool)) { // there's some pool in the cluster that is not yet // in avoid set - avoidAllLocalPools = false; + avoidAllPools = false; break; } } } - - if (vmRequiresSharedStorage && vmRequiresLocalStorege) { - avoidAllPools = (avoidAllLocalPools || avoidAllSharedPools) ? true : false; - } else if (vmRequiresSharedStorage) { - avoidAllPools = avoidAllSharedPools; - } else if (vmRequiresLocalStorege) { - avoidAllPools = avoidAllLocalPools; - } } if (avoidAllHosts || avoidAllPools) {