-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Support multi-scope configuration settings #10300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Abhishek Kumar <[email protected]>
Signed-off-by: Abhishek Kumar <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #10300 +/- ##
============================================
+ Coverage 16.07% 16.13% +0.06%
- Complexity 13189 13233 +44
============================================
Files 5664 5664
Lines 497612 497821 +209
Branches 60216 60243 +27
============================================
+ Hits 79991 80335 +344
+ Misses 408663 408479 -184
- Partials 8958 9007 +49
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@blueorangutan package |
@abh1sar 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. |
Packaging result [SF]: ✖️ el8 ✖️ el9 ✔️ debian ✖️ suse15. SL-JID 12277 |
@blueorangutan package |
@abh1sar 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. |
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 12278 |
@blueorangutan package |
@abh1sar 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. |
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 12282 |
@blueorangutan package |
@abh1sar 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. |
Packaging result [SF]: ✔️ el8 ✔️ el9 ✖️ debian ✔️ suse15. SL-JID 12428 |
@blueorangutan package |
@abh1sar 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. |
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 12430 |
@blueorangutan test |
@abh1sar a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, manually tested that pool settings are taking precedence over the global settings.
@blueorangutan package |
@rohityadavcloud 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. |
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 12443 |
[SF] Trillian test result (tid-12388)
|
…che#526) Introduces multiple scope configuration parameters by changing the column `scope` of table `configuration` from string to bitmask. Following configuration parameters can now be configured at a Storage Pool scope in addition to the Zone scope. 1. **pool.storage.capacity.disablethreshold**: Percentage (as a value between 0 and 1) of storage utilization or used space relative to the total storage capacity above which the storage pool is disabled for new allocations. migration and resize operations. 2. **pool.storage.allocated.capacity.disablethreshold**: Percentage (as a value between 0 and 1) of allocated storage space relative to total overprovisioned storage capacity above which the storage pool is disabled for new allocations, migration and resize operations. 3. **pool.storage.allocated.resize.capacity.disablethreshold**: Percentage (as a value between 0 and 1) of allocated storage space relative to total overprovisioned storage capacity above which the storage pool is disabled for volume resize. This is applicable only when volume.resize.allowed.beyond.allocation is set to true 4. **volume.resize.allowed.beyond.allocation**: Specifies whether a volume can be resized beyond the pool capacity allocation disable threshold (pool.storage.allocated.capacity.disablethreshold) but not exceeding the resize capacity disable threshold (pool.storage.allocated.resize.capacity.disablethreshold). Please note that resize due to change of disk offering still honours pool capacity allocation disable threshold (pool.storage.allocated.capacity.disablethreshold). If set, the granular scope (storage pool) overrides the value set for the broader scope (zone). If set, the granular scope (storage pool) overrides the value set for the broader scope (zone). The operator will see these configurations in the Settings tab under zone as well as under primary storage. listConfigurations storageid=<storage_id> | zoneid=<zone_id> and updateConfigurations storage_id=<storage_id> | zoneid=<zone_id> will also work. Upstream PR: apache#10300 --------- Co-authored-by: Harikrishna Patnala <[email protected]>
This PR introduces the concept of multi-scope configuration settings. In addition to the Global level, currently all configurations can be set at a single scope level. It will be useful if a configuration can be set at multiple scopes. For example, a configuration set at the domain level will apply for all accounts, but it can be set for an account as well. In which case the account level setting will override the domain level setting. This is done by changing the column `scope` of table `configuration` from string (single scope) to bitmask (multiple scopes). ``` public enum Scope { Global(null, 1), Zone(Global, 1 << 1), Cluster(Zone, 1 << 2), StoragePool(Cluster, 1 << 3), ManagementServer(Global, 1 << 4), ImageStore(Zone, 1 << 5), Domain(Global, 1 << 6), Account(Domain, 1 << 7); ``` Each scope is also assigned a parent scope. When a configuration for a given scope is not defined but is available for multiple scope types, the value will be retrieved from the parent scope. If there is no parent scope or if the configuration is defined for a single scope only, the value will fall back to the global level. Hierarchy for different scopes is defined as below : - Global - Zone - Cluster - Storage Pool - Image Store - Management Server - Domain - Account This PR also updates the scope of the following configurations (Storage Pool scope is added in addition to the existing Zone scope): - pool.storage.allocated.capacity.disablethreshold - pool.storage.allocated.resize.capacity.disablethreshold - pool.storage.capacity.disablethreshold Doc PR : apache/cloudstack-documentation#476 Signed-off-by: Abhishek Kumar <[email protected]> Co-authored-by: Abhishek Kumar <[email protected]>
Description
This PR introduces the concept of multi-scope configuration settings. In addition to the Global level, currently all configurations can be set at a single scope level.
It will be useful if a configuration can be set at multiple scopes. For example, a configuration set at the domain level
will apply for all accounts, but it can be set for an account as well. In which case the account level setting will override the domain level setting.
This is done by changing the column
scope
of tableconfiguration
from string (single scope) to bitmask (multiple scopes).Each scope is also assigned a parent scope. When a configuration for a given scope is not defined but is available for multiple scope types, the value will be retrieved from the parent scope. If there is no parent scope or if the configuration is defined for a single scope only, the value will fall back to the global level.
Hierarchy for different scopes is defined as below :
This PR also updates the scope of the following configurations (Storage Pool scope is added in addition to the existing Zone scope):
Doc PR : apache/cloudstack-documentation#476
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
Tested Upgrade path
Tested that the configuration values are set correctly for all mentioned configurations at different scopes.
How did you try to break this feature and the system with this change?