Updated Branches: refs/heads/master 34823eb85 -> ba4a05eed
CLOUDSTACK-4287: Template sync should remove template_store_ref entry for corrupted template. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ba4a05ee Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ba4a05ee Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ba4a05ee Branch: refs/heads/master Commit: ba4a05eed10e07dff52de1efd8a642c399a01871 Parents: 34823eb Author: Min Chen <[email protected]> Authored: Thu Aug 15 14:23:16 2013 -0700 Committer: Min Chen <[email protected]> Committed: Thu Aug 15 14:56:49 2013 -0700 ---------------------------------------------------------------------- .../org/apache/cloudstack/storage/image/TemplateServiceImpl.java | 2 ++ 1 file changed, 2 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ba4a05ee/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java ---------------------------------------------------------------------- diff --git a/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java b/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java index 578ba69..ea56f6d 100644 --- a/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java +++ b/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java @@ -312,6 +312,8 @@ public class TemplateServiceImpl implements TemplateService { + "is corrupted, please check in image store: " + tmpltStore.getDataStoreId(); s_logger.warn(msg); } else { + s_logger.info("Removing template_store_ref entry for corrupted template " + tmplt.getName()); + _vmTemplateStoreDao.remove(tmpltStore.getId()); toBeDownloaded.add(tmplt); }
