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 2013/08/28 01:57:05 UTC
git commit: updated refs/heads/4.2-forward to 4ba68e3
Updated Branches:
refs/heads/4.2-forward 8326dfb76 -> 4ba68e3b3
CLOUDSTACK-4530:Create Template from a Snapshot fails with unable to
find any snapshot ova/ovf when we have multiple secondary storage for a
zone.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4ba68e3b
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4ba68e3b
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4ba68e3b
Branch: refs/heads/4.2-forward
Commit: 4ba68e3b3fd58bd1e7333bb68e8970b3af7a954f
Parents: 8326dfb
Author: Min Chen <mi...@citrix.com>
Authored: Tue Aug 27 16:56:21 2013 -0700
Committer: Min Chen <mi...@citrix.com>
Committed: Tue Aug 27 16:56:49 2013 -0700
----------------------------------------------------------------------
server/src/com/cloud/template/TemplateManagerImpl.java | 4 ++++
1 file changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4ba68e3b/server/src/com/cloud/template/TemplateManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/template/TemplateManagerImpl.java b/server/src/com/cloud/template/TemplateManagerImpl.java
index 2a0e04d..fa92a02 100755
--- a/server/src/com/cloud/template/TemplateManagerImpl.java
+++ b/server/src/com/cloud/template/TemplateManagerImpl.java
@@ -1374,6 +1374,10 @@ public class TemplateManagerImpl extends ManagerBase implements TemplateManager,
AsyncCallFuture<TemplateApiResult> future = null;
if (snapshotId != null) {
SnapshotInfo snapInfo = this._snapshotFactory.getSnapshot(snapshotId, DataStoreRole.Image);
+ DataStore snapStore = snapInfo.getDataStore();
+ if ( snapStore != null ){
+ store = snapStore; // pick snapshot image store to create template
+ }
future = this._tmpltSvr.createTemplateFromSnapshotAsync(snapInfo, tmplInfo, store);
} else if (volumeId != null) {
VolumeInfo volInfo = this._volFactory.getVolume(volumeId);