mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-9686: Fixed multiple entires for builtin template in template
store ref table so builtin template is never downloaded completely
In handleSysTemplateDownload method creating template only if there exists no entry
handleTemplateSync will take care of other scenario
(cherry picked from commit 929595c114)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
63997b3b19
commit
16b67b40fd
|
|
@ -267,7 +267,7 @@ public class TemplateServiceImpl implements TemplateService {
|
|||
|
||||
for (VMTemplateVO template : toBeDownloaded) {
|
||||
TemplateDataStoreVO tmpltHost = _vmTemplateStoreDao.findByStoreTemplate(store.getId(), template.getId());
|
||||
if (tmpltHost == null || tmpltHost.getState() != ObjectInDataStoreStateMachine.State.Ready) {
|
||||
if (tmpltHost == null) {
|
||||
associateTemplateToZone(template.getId(), dcId);
|
||||
s_logger.info("Downloading builtin template " + template.getUniqueName() + " to data center: " + dcId);
|
||||
TemplateInfo tmplt = _templateFactory.getTemplate(template.getId(), DataStoreRole.Image);
|
||||
|
|
|
|||
Loading…
Reference in New Issue