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


##########
engine/storage/src/main/java/org/apache/cloudstack/storage/image/BaseImageStoreDriverImpl.java:
##########
@@ -175,10 +178,13 @@ public void createAsync(DataStore dataStore, DataObject 
data, AsyncCompletionCal
         AsyncCallbackDispatcher<BaseImageStoreDriverImpl, DownloadAnswer> 
caller = AsyncCallbackDispatcher.create(this);
         caller.setContext(context);
         if (data.getType() == DataObjectType.TEMPLATE) {
-            
caller.setCallback(caller.getTarget().createTemplateAsyncCallback(null, null));
-            if (logger.isDebugEnabled()) {
-                logger.debug("Downloading template to data store {}", 
dataStore);
+            if (dataStoreDao.findById(dataStore.getId()).isReadonly()) {
+                logger.debug("Template [{}] will not be downloaded to image 
store [{}] because this store is marked as read-only.", data.getName(),
+                        dataStore.getName());
+                return;

Review Comment:
   same here



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