cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mc...@apache.org
Subject [1/3] git commit: updated refs/heads/master to 3efa276
Date Sat, 10 Aug 2013 01:27:00 GMT
Updated Branches:
  refs/heads/master 24ef5ba9f -> 3efa2767a


CLOUDSTACK-4129: select SSVM based on ImageCache data store instead of
region wide image store.


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

Branch: refs/heads/master
Commit: e018936dc46f448bdcd656b09a1830f5d553b8ec
Parents: 24ef5ba
Author: Min Chen <min.chen@citrix.com>
Authored: Fri Aug 9 16:27:32 2013 -0700
Committer: Min Chen <min.chen@citrix.com>
Committed: Fri Aug 9 18:13:29 2013 -0700

----------------------------------------------------------------------
 .../storage/endpoint/DefaultEndPointSelector.java           | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e018936d/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 d2ddfd4..0cd8ad3 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/endpoint/DefaultEndPointSelector.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/endpoint/DefaultEndPointSelector.java
@@ -166,7 +166,14 @@ public class DefaultEndPointSelector implements EndPointSelector {
         if (moveBetweenPrimaryImage(srcStore, destStore)) {
             return findEndPointForImageMove(srcStore, destStore);
         } else if (moveBetweenCacheAndImage(srcStore, destStore)) {
-            EndPoint ep = findEndpointForImageStorage(destStore);
+            // pick ssvm based on image cache dc
+            DataStore selectedStore = null;
+            if (srcStore.getRole() == DataStoreRole.ImageCache) {
+                selectedStore = srcStore;
+            } else {
+                selectedStore = destStore;
+            }
+            EndPoint ep = findEndpointForImageStorage(selectedStore);
             return ep;
         } else if (moveBetweenImages(srcStore, destStore)) {
             EndPoint ep = findEndpointForImageStorage(destStore);


Mime
View raw message