You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by pr...@apache.org on 2013/01/24 02:31:19 UTC

git commit: Planner should set the pool information in the destination for volumes that are not yet ready.

Updated Branches:
  refs/heads/javelin 6088cbfe4 -> 057097d0e


Planner should set the pool information in the destination for volumes that are not yet ready.


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

Branch: refs/heads/javelin
Commit: 057097d0e0e706edbedc5835d27961d212e795af
Parents: 6088cbf
Author: Prachi Damle <pr...@cloud.com>
Authored: Wed Jan 23 17:30:37 2013 -0800
Committer: Prachi Damle <pr...@cloud.com>
Committed: Wed Jan 23 17:31:00 2013 -0800

----------------------------------------------------------------------
 server/src/com/cloud/deploy/FirstFitPlanner.java |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/057097d0/server/src/com/cloud/deploy/FirstFitPlanner.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/deploy/FirstFitPlanner.java b/server/src/com/cloud/deploy/FirstFitPlanner.java
index faed795..66a24ac 100755
--- a/server/src/com/cloud/deploy/FirstFitPlanner.java
+++ b/server/src/com/cloud/deploy/FirstFitPlanner.java
@@ -753,7 +753,9 @@ public class FirstFitPlanner extends PlannerBase implements DeploymentPlanner {
                             s_logger.debug("Planner need not allocate a pool for this volume since its READY");
                             suitablePools.add(pool);
                             suitableVolumeStoragePools.put(toBeCreated, suitablePools);
-                            readyAndReusedVolumes.add(toBeCreated);
+                            if (!(toBeCreated.getState() == Volume.State.Allocated || toBeCreated.getState() == Volume.State.Creating)) {
+                                readyAndReusedVolumes.add(toBeCreated);
+                            }
                             continue;
                         }else{
                             s_logger.debug("Pool of the volume does not fit the specified plan, need to reallocate a pool for this volume");