Skip to content

Commit ba4a05e

Browse files
committed
CLOUDSTACK-4287: Template sync should remove template_store_ref entry
for corrupted template.
1 parent 34823eb commit ba4a05e

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,8 @@ public void handleTemplateSync(DataStore store) {
312312
+ "is corrupted, please check in image store: " + tmpltStore.getDataStoreId();
313313
s_logger.warn(msg);
314314
} else {
315+
s_logger.info("Removing template_store_ref entry for corrupted template " + tmplt.getName());
316+
_vmTemplateStoreDao.remove(tmpltStore.getId());
315317
toBeDownloaded.add(tmplt);
316318
}
317319

0 commit comments

Comments
 (0)