CLOUDSTACK-4204: return a ZoneScope in picking cache storage.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/3efa2767 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/3efa2767 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/3efa2767 Branch: refs/heads/master Commit: 3efa2767a88cdc68aadb4d8acb8ca2198ed39538 Parents: fc77437 Author: Min Chen <min.c...@citrix.com> Authored: Fri Aug 9 18:11:53 2013 -0700 Committer: Min Chen <min.c...@citrix.com> Committed: Fri Aug 9 18:14:01 2013 -0700 ---------------------------------------------------------------------- .../cloudstack/storage/motion/AncientDataMotionStrategy.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3efa2767/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 b643466..0fed922 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 @@ -183,11 +183,11 @@ public class AncientDataMotionStrategy implements DataMotionStrategy { Scope selectedScope = null; if (srcScope.getScopeId() != null) { - selectedScope = srcScope; + selectedScope = getZoneScope(srcScope); } else if (destScope.getScopeId() != null) { - selectedScope = destScope; + selectedScope = getZoneScope(destScope); } else { - s_logger.warn("Cannot find a zone-wide scope for move between cache store and image store"); + s_logger.warn("Cannot find a zone-wide scope for movement that needs a cache storage"); } return selectedScope; }