mirror of https://github.com/apache/cloudstack.git
bug 10775: copyTemplate - Compute checksum at source from now on because the checksum might be referring to the compressed template. Send this checksum for comparison.
This commit is contained in:
parent
2f804dd799
commit
09c26e5671
|
|
@ -236,12 +236,14 @@ public class DownloadMonitorImpl implements DownloadMonitor {
|
|||
|
||||
if(destTmpltHost != null) {
|
||||
start();
|
||||
|
||||
String sourceChecksum = _vmMgr.getChecksum(srcTmpltHost.getHostId(), srcTmpltHost.getInstallPath());
|
||||
DownloadCommand dcmd =
|
||||
new DownloadCommand(destServer.getStorageUrl(), url, template, TemplateConstants.DEFAULT_HTTP_AUTH_USER, _copyAuthPasswd, maxTemplateSizeInBytes);
|
||||
new DownloadCommand(destServer.getStorageUrl(), url, template, TemplateConstants.DEFAULT_HTTP_AUTH_USER, _copyAuthPasswd, maxTemplateSizeInBytes);
|
||||
|
||||
if (downloadJobExists) {
|
||||
dcmd = new DownloadProgressCommand(dcmd, destTmpltHost.getJobId(), RequestType.GET_OR_RESTART);
|
||||
}
|
||||
}
|
||||
dcmd.setChecksum(sourceChecksum); // We need to set the checksum as the source template might be a compressed url and have cksum for compressed image. Bug #10775
|
||||
HostVO ssAhost = _agentMgr.getSSAgent(destServer);
|
||||
if( ssAhost == null ) {
|
||||
s_logger.warn("There is no secondary storage VM for secondary storage host " + destServer.getName());
|
||||
|
|
|
|||
Loading…
Reference in New Issue