You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ra...@apache.org on 2014/11/17 11:22:19 UTC

[1/2] git commit: updated refs/heads/master to d5b6fc4

Repository: cloudstack
Updated Branches:
  refs/heads/master 91ffaaa5a -> d5b6fc4f0


CLOUDSTACK-7703, 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)


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

Branch: refs/heads/master
Commit: 4705933a6459c1b25e71da891a6f736c0a736836
Parents: c78f14c
Author: Anshul Gangwar <an...@citrix.com>
Authored: Mon Oct 20 16:04:25 2014 +0530
Committer: Anshul Gangwar <an...@citrix.com>
Committed: Thu Oct 30 13:36:01 2014 +0530

----------------------------------------------------------------------
 .../deploy/DeploymentPlanningManagerImpl.java    | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4705933a/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 bfb33b0..6b80dba 100755
--- a/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java
+++ b/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java
@@ -31,7 +31,6 @@ 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;
@@ -121,6 +120,7 @@ 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,7 +990,10 @@ StateListener<State, VirtualMachine.Event, VirtualMachine> {
 
         // 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);
@@ -1024,7 +1027,7 @@ StateListener<State, VirtualMachine.Event, VirtualMachine> {
                 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;
                     }
                 }
@@ -1038,11 +1041,19 @@ StateListener<State, VirtualMachine.Event, VirtualMachine> {
                     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) {


[2/2] git commit: updated refs/heads/master to d5b6fc4

Posted by ra...@apache.org.
Merge branch 'CLOUDSTACK-7703' of https://github.com/anshul1886/cloudstack-1
This closes #30


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

Branch: refs/heads/master
Commit: d5b6fc4f04450bb2ff733f2eaf1ae800578be567
Parents: 91ffaaa 4705933
Author: Rajesh Battala <ra...@citrix.com>
Authored: Mon Nov 17 15:55:02 2014 +0530
Committer: Rajesh Battala <ra...@citrix.com>
Committed: Mon Nov 17 15:55:17 2014 +0530

----------------------------------------------------------------------
 .../deploy/DeploymentPlanningManagerImpl.java    | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)
----------------------------------------------------------------------