Damans227 commented on code in PR #9564:
URL: https://github.com/apache/cloudstack/pull/9564#discussion_r4400991931
##########
engine/components-api/src/main/java/com/cloud/storage/StorageManager.java:
##########
@@ -447,4 +451,25 @@ void connectHostsToPool(DataStore primaryStore, List<Long>
hostIds, Scope scope,
static ConfigKey<Boolean> getMountDisabledStoragePool() {
return MountDisabledStoragePool;
}
+
+ /**
+ * Resolves the preferred storage pool UUID, checking the Account scope
first, then the Cluster scope and finally the Global value.
+ * @return a pair of the scope where the value was found and the storage
pool UUID, or null if it is not set at any level
+ */
+ static Pair<ConfigKey.Scope, String> getPreferredStoragePoolUuid(Long
accountId, Long clusterId) {
+ if (accountId != null) {
+ String uuid =
PreferredStoragePool.valueInScope(ConfigKey.Scope.Account, accountId, true);
+ if (StringUtils.isNotBlank(uuid)) {
+ return new Pair<>(ConfigKey.Scope.Account, uuid);
Review Comment:
@nvazquez if the account's pool isnt usable for this vm, should we still try
the cluster and then the global pool? right now it stops at the account value,
so the cluster setting is ignored
--
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]