Damans227 commented on code in PR #13023:
URL: https://github.com/apache/cloudstack/pull/13023#discussion_r4400892384
##########
engine/storage/image/src/main/java/org/apache/cloudstack/storage/image/TemplateServiceImpl.java:
##########
@@ -295,10 +298,14 @@ public void handleSysTemplateDownload(HypervisorType
hostHyper, Long dcId) {
}
protected boolean shouldDownloadTemplateToStore(VMTemplateVO template,
DataStore store) {
+ if (_storeMgr.isRemovedOrReadonly(store)) {
+ return false;
+ }
+
Long zoneId = store.getScope().getScopeId();
DataStore directedStore =
_tmpltMgr.verifyHeuristicRulesForZone(template, zoneId);
Review Comment:
the throw is in the rule check this calls, not here. if the rule points at a
read-only store the rule check now throws, so syncing any other store in that
zone stops at the first template and skips the rest. should we catch it here
and return false?
##########
engine/storage/image/src/main/java/org/apache/cloudstack/storage/image/TemplateServiceImpl.java:
##########
@@ -163,6 +164,8 @@ public class TemplateServiceImpl implements TemplateService
{
TemplateDataFactory imageFactory;
@Inject
StorageOrchestrationService storageOrchestrator;
+ @Inject
+ ImageStoreDao imageStoreDao;
Review Comment:
@GaOrtiga is this used anywhere? looks like it can go
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]