From adbf37090952fc4a5c1675ef657333807b56c647 Mon Sep 17 00:00:00 2001 From: Wei Zhou Date: Wed, 13 Nov 2024 14:31:31 +0100 Subject: [PATCH] Revert "storage: fix private templates are not copied to new image store (#9206)" (#9839) This reverts commit e06f80e899127abe45c10ff2d38420a770ceb076. --- .../apache/cloudstack/storage/image/TemplateServiceImpl.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/engine/storage/image/src/main/java/org/apache/cloudstack/storage/image/TemplateServiceImpl.java b/engine/storage/image/src/main/java/org/apache/cloudstack/storage/image/TemplateServiceImpl.java index c040e1a7ad69..6c4fcab2f174 100644 --- a/engine/storage/image/src/main/java/org/apache/cloudstack/storage/image/TemplateServiceImpl.java +++ b/engine/storage/image/src/main/java/org/apache/cloudstack/storage/image/TemplateServiceImpl.java @@ -532,6 +532,11 @@ public void handleTemplateSync(DataStore store) { s_logger.info("Skip downloading template " + tmplt.getUniqueName() + " since no url is specified."); continue; } + // if this is private template, skip sync to a new image store + if (isSkipTemplateStoreDownload(tmplt, zoneId)) { + s_logger.info("Skip sync downloading private template " + tmplt.getUniqueName() + " to a new image store"); + continue; + } // if this is a region store, and there is already an DOWNLOADED entry there without install_path information, which // means that this is a duplicate entry from migration of previous NFS to staging.