Spaceman1984 commented on a change in pull request #4138:
URL: https://github.com/apache/cloudstack/pull/4138#discussion_r444789643



##########
File path: 
engine/storage/image/src/main/java/org/apache/cloudstack/storage/image/TemplateServiceImpl.java
##########
@@ -489,6 +489,10 @@ public void handleTemplateSync(DataStore store) {
                                     s_logger.info("Removing leftover template 
" + uniqueName + " entry from template store table");
                                     // remove those leftover entries
                                     
_vmTemplateStoreDao.remove(tmpltStore.getId());
+                                    // remove from zones
+                                    
_vmTemplateZoneDao.deletePrimaryRecordsForTemplate(tmplt.getId());
+                                    // remove template
+                                    _templateDao.remove(tmplt.getId());

Review comment:
       You are correct @rhtyd, this code removes the template if there is an 
error in any of the storages. I have reverted.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to