Repository navigation
Conversation
|
@blueorangutan package |
|
@nvazquez a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #9564 +/- ##
============================================
+ Coverage 20.66% 20.77% +0.10%
- Complexity 21720 21915 +195
============================================
Files 6492 6496 +4
Lines 590728 591634 +906
Branches 72448 72594 +146
============================================
+ Hits 122101 122886 +785
- Misses 455355 455408 +53
- Partials 13272 13340 +68
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 10733 |
| true, ConfigKey.Scope.Zone); | ||
| ConfigKey<String> PreferredStoragePool = new ConfigKey<String>(String.class, "preferred.storage.pool", "Advanced", "", | ||
| "The UUID of preferred storage pool for allocation.", true, ConfigKey.Scope.Account, null); | ||
| ConfigKey<String> PreferredStoragePool = new ConfigKey<>(String.class, "preferred.storage.pool", "Advanced", "", |
There was a problem hiding this comment.
I wonder if we can have two configurations with same key
- 1 for global/zone/cluster
- 2 for global/domain/account
changing from Account to Cluster may be disliked by some users (maybe)
There was a problem hiding this comment.
Thanks @weizhouapache - there is now an option to define multiple scopes per setting: https://docs.cloudstack.apache.org/en/4.22.0.0/installguide/configuration.html#granular-global-configuration-parameters. I will explore this
|
@blueorangutan test |
|
@nvazquez a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-11126)
|
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
|
@nvazquez should this target 4.19? |
|
@DaanHoogland the issue this PR fixes was on the 4.19.2 milestone but I think it shouldn't be there as 4.20.0 is already out and changing the scope of the setting would be conflicting, perhaps it should be targeted to 4.20 instead of main? |
|
@nvazquez we can change to v21 as well as it is an enhancement...? |
|
Sure @DaanHoogland fixed |
|
@blueorangutan package |
|
@nvazquez a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 19783 |
|
@blueorangutan test |
|
@nvazquez a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
| if (accountId != null) { | ||
| String uuid = PreferredStoragePool.valueInScope(ConfigKey.Scope.Account, accountId, true); | ||
| if (StringUtils.isNotBlank(uuid)) { | ||
| return new Pair<>(ConfigKey.Scope.Account, uuid); |
There was a problem hiding this 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
There was a problem hiding this comment.
I think that may add some complexity to the logic, but can be a good enhancement. Would like to address it in a separate follow up PR, leaving this PR to the extension of the setting only
There was a problem hiding this comment.
@nvazquez fine to move the cluster and domain fallback to a follow up, those are new. can we keep the global fallback here though? main still tries the global pool when the account pool isnt usable, so this would break setups that rely on it today
|
[SF] Trillian test result (tid-17299)
|
| */ | ||
| static Pair<ConfigKey.Scope, String> getPreferredStoragePoolUuid(Long accountId, Long clusterId) { | ||
| if (accountId != null) { | ||
| String uuid = PreferredStoragePool.valueInScope(ConfigKey.Scope.Account, accountId, true); |
There was a problem hiding this comment.
Since we are already doing account scope, should we also add a domain scope?
| * 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) { |
There was a problem hiding this comment.
I don't understand why implement this in the interface. We should move the implementation to StorageManagerImpl
|
@blueorangutan package |
|
@nvazquez a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
There was a problem hiding this comment.
🟡 Changes recommended
Pool resolution stops at an unsuitable account-level preference instead of falling back to a suitable global pool, leaving allocation to allocator ordering in both deployment planning and volume orchestration.
1 open issue
Review effort: Balanced
| if (preferredStoragePool == null) { | ||
| return Optional.empty(); | ||
| } | ||
| Optional<StoragePool> storagePool = getMatchingStoragePool(preferredStoragePool.second(), poolList); |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 19871 |
|
@blueorangutan test |
|
@nvazquez a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-17439)
|
JoaoJandre
left a comment
There was a problem hiding this comment.
CLGTM. Did not test it

Description
This PR changes the
preferred.storage.poolsetting scope fromAccounttoAccount,Domain, andClusterscope.The Account value takes precedence over the Domain value, the Domain value takes precedence over the Cluster value, which takes precedence over the Global value.
Fixes: #8959
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?