GaOrtiga commented on code in PR #13023:
URL: https://github.com/apache/cloudstack/pull/13023#discussion_r3721948587
##########
server/src/main/java/com/cloud/template/HypervisorTemplateAdapter.java:
##########
@@ -338,6 +338,11 @@ protected boolean isZoneAndImageStoreAvailable(DataStore
imageStore, Long zoneId
return false;
}
+ if (_imgStoreDao.findById(imageStore.getId()).isReadonly()) {
+ logger.info("Image store [{}] is marked as read-only. Skip
downloading template to this image store.", imageStore);
+ return false;
+ }
Review Comment:
This one makes sense, implementing
##########
engine/storage/src/main/java/org/apache/cloudstack/storage/datastore/DataStoreManagerImpl.java:
##########
@@ -199,4 +207,18 @@ public Long getStoreZoneId(long storeId, DataStoreRole
role) {
} catch (CloudRuntimeException ignored) {}
return null;
}
+
+ @Override
+ public boolean isRemovedOrReadonly(DataStore store) {
+ ImageStoreVO storeVO = imageStoreDao.findById(store.getId());
+ if (storeVO == null) {
+ logger.debug("Could not find image store with id [{}], skipping
it.", store.getId());
+ return true;
+ }
+ if (storeVO.isReadonly()) {
+ logger.debug("Image store [{}] is read-only, skipping it.",
storeVO);
+ return true;
+ }
+ return false;
+ }
Review Comment:
this one doesnt
--
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]