Skip to content

Commit bf7fc63

Browse files
committed
Fix the size of a template downloaded from secondary storage
Fixing the size of a template that is downloaded from secondary storage to StorPool
1 parent 33cdddf commit bf7fc63

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: plugins/storage/volume/storpool/src/main/java/org/apache/cloudstack/storage/datastore/driver/StorPoolPrimaryDataStoreDriver.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,8 @@ public void copyAsync(DataObject srcData, DataObject dstData, AsyncCompletionCal
776776

777777
if (answer != null && answer.getResult()) {
778778
// successfully downloaded template to primary storage
779-
answer = createVolumeSnapshot(cmd, size, conn, volName, dstTO);
779+
TemplateObjectTO templ = (TemplateObjectTO) ((CopyCmdAnswer) answer).getNewData();
780+
answer = createVolumeSnapshot(cmd, size, conn, volName, templ);
780781
} else {
781782
err = answer != null ? answer.getDetails() : "Unknown error while downloading template. Null answer returned.";
782783
}

0 commit comments

Comments
 (0)