CLOUDSTACK-9563: ExtractTemplate returns malformed URL after migrating NFS to s3 (#1733)

While downloading the template for the first time install path was not available. During first download after migration template is synced to s3 storage and template install path is updated to DB. But while generating the extract URL we are still taking install path from TemplateDataStoreVO object cached in the process.
This commit is contained in:
SudharmaJain 2017-09-01 14:53:41 +05:30 committed by Rohit Yadav
parent 74fe9e386c
commit 4dd8b5d061
1 changed files with 1 additions and 1 deletions

View File

@ -542,7 +542,7 @@ public class TemplateManagerImpl extends ManagerBase implements TemplateManager,
_tmpltSvr.syncTemplateToRegionStore(templateId, tmpltStore);
TemplateInfo templateObject = _tmplFactory.getTemplate(templateId, tmpltStore);
String extractUrl = tmpltStore.createEntityExtractUrl(tmpltStoreRef.getInstallPath(), template.getFormat(), templateObject);
String extractUrl = tmpltStore.createEntityExtractUrl(templateObject.getInstallPath(), template.getFormat(), templateObject);
tmpltStoreRef.setExtractUrl(extractUrl);
tmpltStoreRef.setExtractUrlCreated(DateUtil.now());
_tmplStoreDao.update(tmpltStoreRef.getId(), tmpltStoreRef);