mirror of https://github.com/apache/cloudstack.git
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:
parent
74fe9e386c
commit
4dd8b5d061
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue