GaOrtiga commented on code in PR #13023:
URL: https://github.com/apache/cloudstack/pull/13023#discussion_r4401834938


##########
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:
   Got it. Sure.
   That check also has other exceptions thrown, meaning this will fix an 
already existing issue, which is a plus.



-- 
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]

Reply via email to