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 69BDC10C15 for ; Fri, 7 Feb 2014 22:11:13 +0000 (UTC) Received: (qmail 12873 invoked by uid 500); 7 Feb 2014 22:11:01 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 12718 invoked by uid 500); 7 Feb 2014 22:10:56 -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 12455 invoked by uid 99); 7 Feb 2014 22:10:52 -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, 07 Feb 2014 22:10:52 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 1E1A791FB8E; Fri, 7 Feb 2014 22:10:51 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: animesh@apache.org To: commits@cloudstack.apache.org Date: Fri, 07 Feb 2014 22:11:05 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [16/19] git commit: updated refs/heads/4.3 to c1af92f CLOUDSTACK-6046:CreateVolume from snapshot is failing with S3 as secondary storage and zone-wide primary storage.(cherry picked from commit 900c51103ab1e29b86ea5f76cb73c72b3de51db7) Signed-off-by: Animesh Chaturvedi Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/3cd9dee1 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/3cd9dee1 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/3cd9dee1 Branch: refs/heads/4.3 Commit: 3cd9dee1db21794f19fff3699ed79115bfe02ecc Parents: 278c54a Author: Min Chen Authored: Thu Feb 6 15:33:05 2014 -0800 Committer: Animesh Chaturvedi Committed: Fri Feb 7 13:24:48 2014 -0800 ---------------------------------------------------------------------- .../cloudstack/storage/motion/AncientDataMotionStrategy.java | 2 +- .../cloudstack/storage/endpoint/DefaultEndPointSelector.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3cd9dee1/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java ---------------------------------------------------------------------- diff --git a/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java b/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java index 30edf68..f2ed667 100644 --- a/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java +++ b/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java @@ -249,7 +249,7 @@ AncientDataMotionStrategy implements DataMotionStrategy { if (srcData.getDataStore().getRole() == DataStoreRole.Primary) { ep = selector.select(volObj); } else { - ep = selector.select(snapObj, volObj); + ep = selector.select(srcData, volObj); } CopyCommand cmd = new CopyCommand(srcData.getTO(), volObj.getTO(), _createVolumeFromSnapshotWait, VirtualMachineManager.ExecuteInSequence.value()); http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3cd9dee1/engine/storage/src/org/apache/cloudstack/storage/endpoint/DefaultEndPointSelector.java ---------------------------------------------------------------------- diff --git a/engine/storage/src/org/apache/cloudstack/storage/endpoint/DefaultEndPointSelector.java b/engine/storage/src/org/apache/cloudstack/storage/endpoint/DefaultEndPointSelector.java index 967251f..39bc839 100644 --- a/engine/storage/src/org/apache/cloudstack/storage/endpoint/DefaultEndPointSelector.java +++ b/engine/storage/src/org/apache/cloudstack/storage/endpoint/DefaultEndPointSelector.java @@ -167,10 +167,11 @@ public class DefaultEndPointSelector implements EndPointSelector { poolId = destStore.getId(); } else { // if both are zone scope - selectedScope = srcScope; if (srcStore.getRole() == DataStoreRole.Primary) { + selectedScope = srcScope; poolId = srcStore.getId(); } else if (destStore.getRole() == DataStoreRole.Primary) { + selectedScope = destScope; poolId = destStore.getId(); } }