You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by mc...@apache.org on 2014/02/07 00:34:15 UTC

git commit: updated refs/heads/4.3-forward to 900c511

Updated Branches:
  refs/heads/4.3-forward 7a71cf33c -> 900c51103


CLOUDSTACK-6046:CreateVolume from snapshot is failing with S3 as
secondary storage and zone-wide primary storage.

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

Branch: refs/heads/4.3-forward
Commit: 900c51103ab1e29b86ea5f76cb73c72b3de51db7
Parents: 7a71cf3
Author: Min Chen <mi...@citrix.com>
Authored: Thu Feb 6 15:33:05 2014 -0800
Committer: Min Chen <mi...@citrix.com>
Committed: Thu Feb 6 15:33:05 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/900c5110/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/900c5110/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();
             }
         }