Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C396F10A7B for ; Fri, 17 Jan 2014 22:29:12 +0000 (UTC) Received: (qmail 86682 invoked by uid 500); 17 Jan 2014 22:29:12 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 86661 invoked by uid 500); 17 Jan 2014 22:29:12 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 86652 invoked by uid 99); 17 Jan 2014 22:29:11 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Jan 2014 22:29:11 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 71F74378B8; Fri, 17 Jan 2014 22:29:11 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: prachidamle@apache.org To: commits@cloudstack.apache.org Message-Id: <486b121aa70544cfbdeb44c66d2399ed@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: updated refs/heads/4.3 to c2902db Date: Fri, 17 Jan 2014 22:29:11 +0000 (UTC) Updated Branches: refs/heads/4.3 67bb66e54 -> c2902db0b CLOUDSTACK-5895: CreateVolumeFromSnapshot can fail in a multiple pod environment with tagged storagepool Changes: After finding the storagepool suitable to create the volume, we should not look for more pods Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c2902db0 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c2902db0 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c2902db0 Branch: refs/heads/4.3 Commit: c2902db0b11c9bc8cf11e38aee8b4f683fe39cea Parents: 67bb66e Author: Prachi Damle Authored: Fri Jan 17 11:56:04 2014 -0800 Committer: Prachi Damle Committed: Fri Jan 17 14:05:22 2014 -0800 ---------------------------------------------------------------------- .../engine/orchestration/VolumeOrchestrator.java | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c2902db0/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java ---------------------------------------------------------------------- diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java b/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java index edc5985..1b8bd72 100644 --- a/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java +++ b/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java @@ -339,6 +339,12 @@ public class VolumeOrchestrator extends ManagerBase implements VolumeOrchestrati while ((pool = findStoragePool(dskCh, dc, pod.first(), null, null, null, poolsToAvoid)) != null) { break; } + if (pool != null) { + if (s_logger.isDebugEnabled()) { + s_logger.debug("Found a suitable pool for create volume: " + pool.getId()); + } + break; + } } } @@ -802,7 +808,7 @@ public class VolumeOrchestrator extends ManagerBase implements VolumeOrchestrati } catch (NoTransitionException e) { s_logger.debug("Unable to destroy existing volume: " + e.toString()); } - + return newVolume; } }); @@ -1262,7 +1268,7 @@ public class VolumeOrchestrator extends ManagerBase implements VolumeOrchestrati } return true; } - + public static final ConfigKey MaxVolumeSize = new ConfigKey(Long.class, "storage.max.volume.size", "Storage", @@ -1341,7 +1347,7 @@ public class VolumeOrchestrator extends ManagerBase implements VolumeOrchestrati VolumeVO vol = _volsDao.findById(volumeId); return dataStoreMgr.getPrimaryDataStore(vol.getPoolId()).getUuid(); } - + @Override public void updateVolumeDiskChain(long volumeId, String path, String chainInfo) { VolumeVO vol = _volsDao.findById(volumeId); @@ -1351,10 +1357,10 @@ public class VolumeOrchestrator extends ManagerBase implements VolumeOrchestrati return; if(!vol.getPath().equalsIgnoreCase(path)) needUpdate = true; - + if(chainInfo != null && (vol.getChainInfo() == null || !chainInfo.equalsIgnoreCase(vol.getChainInfo()))) needUpdate = true; - + if(needUpdate) { s_logger.info("Update volume disk chain info. vol: " + vol.getId() + ", " + vol.getPath() + " -> " + path + ", " + vol.getChainInfo() + " -> " + chainInfo);