cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject git commit: updated refs/heads/4.3 to 14e048d
Date Wed, 19 Nov 2014 11:31:43 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.3 e6d00bcc6 -> 14e048dad


CLOUDSTACK-7752: Fixed deployment planner stuck in infinite loop. If we create VM with shared
service offering and attach disk with local disk offering, and one of storage pool is full(cannot
be allocated) and other is not full then we are not putting the cluster in avoid list which
is causing this infinite loop.

Fixed by putting the cluster in avoid list even if one of the storage pool is full(cannot
be allocated)

Signed-off-by: Daan Hoogland <daan@onecht.net>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/14e048da
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/14e048da
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/14e048da

Branch: refs/heads/4.3
Commit: 14e048dadabba67d09f85d12019fcd39b8b47db1
Parents: e6d00bc
Author: Anshul Gangwar <anshul.gangwar@citrix.com>
Authored: Wed Nov 19 09:38:18 2014 +0530
Committer: Daan Hoogland <daan@onecht.net>
Committed: Wed Nov 19 12:21:02 2014 +0100

----------------------------------------------------------------------
 .../deploy/DeploymentPlanningManagerImpl.java      | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/14e048da/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java b/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java
index d9e1ecc..04824e4 100644
--- a/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java
+++ b/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java
@@ -950,7 +950,10 @@ public class DeploymentPlanningManagerImpl extends ManagerBase implements
Deploy
 
         // 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, avoidAllPools = true;
+        boolean avoidAllHosts = true;
+        boolean avoidAllPools = true;
+        boolean avoidAllLocalPools = true;
+        boolean avoidAllSharedPools = true;
 
         List<HostVO> allhostsInCluster = _hostDao.listAllUpAndEnabledNonHAHosts(Host.Type.Routing,
clusterVO.getId(),
                 clusterVO.getPodId(), clusterVO.getDataCenterId(), null);
@@ -985,7 +988,7 @@ public class DeploymentPlanningManagerImpl extends ManagerBase implements
Deploy
                 for (StoragePoolVO pool : allPoolsInCluster) {
                     if (!allocatorAvoidOutput.shouldAvoid(pool)) {
                         // there's some pool in the cluster that is not yet in avoid set
-                        avoidAllPools = false;
+                        avoidAllSharedPools = false;
                         break;
                     }
                 }
@@ -999,11 +1002,19 @@ public class DeploymentPlanningManagerImpl extends ManagerBase implements
Deploy
                     if (!allocatorAvoidOutput.shouldAvoid(pool)) {
                         // there's some pool in the cluster that is not yet
                         // in avoid set
-                        avoidAllPools = false;
+                        avoidAllLocalPools = false;
                         break;
                     }
                 }
             }
+
+            if (vmRequiresSharedStorage && vmRequiresLocalStorege) {
+                avoidAllPools = (avoidAllLocalPools || avoidAllSharedPools) ? true : false;
+            } else if (vmRequiresSharedStorage) {
+                avoidAllPools = avoidAllSharedPools;
+            } else if (vmRequiresLocalStorege) {
+                avoidAllPools = avoidAllLocalPools;
+            }
         }
 
         if (avoidAllHosts || avoidAllPools) {


Mime
View raw message