Return-Path: X-Original-To: apmail-incubator-cloudstack-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-cloudstack-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 36E6FEAF1 for ; Thu, 24 Jan 2013 01:31:20 +0000 (UTC) Received: (qmail 14993 invoked by uid 500); 24 Jan 2013 01:31:20 -0000 Delivered-To: apmail-incubator-cloudstack-commits-archive@incubator.apache.org Received: (qmail 14974 invoked by uid 500); 24 Jan 2013 01:31:20 -0000 Mailing-List: contact cloudstack-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cloudstack-dev@incubator.apache.org Delivered-To: mailing list cloudstack-commits@incubator.apache.org Received: (qmail 14967 invoked by uid 99); 24 Jan 2013 01:31:20 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Jan 2013 01:31:20 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id CA958824968; Thu, 24 Jan 2013 01:31:19 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: prachidamle@apache.org To: cloudstack-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: git commit: Planner should set the pool information in the destination for volumes that are not yet ready. Message-Id: <20130124013119.CA958824968@tyr.zones.apache.org> Date: Thu, 24 Jan 2013 01:31:19 +0000 (UTC) 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 Authored: Wed Jan 23 17:30:37 2013 -0800 Committer: Prachi Damle 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");