winterhazel commented on code in PR #13023:
URL: https://github.com/apache/cloudstack/pull/13023#discussion_r3336437202
##########
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 (dataStoreManager.isRemovedOrReadonly(dataStore)) {
Review Comment:
Doesn't it make more sense to filter out the removed/read-only secondary
storages in the methods responsible for choosing a secondary storage for
migration/template creation from volume/template copy instead of here in
`createAsync`?
--
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]