cloudstack/plugins
Abhisar Sinha 2a4a1f73d0
Support multi-scope configuration settings (#10300)
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 : https://github.com/apache/cloudstack-documentation/pull/476

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Co-authored-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-02-14 11:25:01 +05:30
..
acl Merge branch '4.20' 2025-02-12 16:54:05 +01:00
affinity-group-processors Merge branch '4.20' 2025-02-01 21:20:08 +01:00
alert-handlers Updating pom.xml version numbers for release 4.21.0.0-SNAPSHOT 2024-11-27 11:47:06 -03:00
api Merge release branch 4.20 to main 2025-01-08 14:01:19 +01:00
backup Add Resource Limits to Backups and Object Storage (#10017) 2025-02-07 16:56:20 +05:30
ca/root-ca Updating pom.xml version numbers for release 4.21.0.0-SNAPSHOT 2024-11-27 11:47:06 -03:00
database Create API to list Quota credits (#9590) 2025-01-16 15:19:32 +01:00
dedicated-resources Merge branch '4.20' 2025-02-01 21:20:08 +01:00
deployment-planners Merge branch '4.20' 2025-02-01 21:20:08 +01:00
drs/cluster Merge release branch 4.20 to main 2025-01-08 14:01:19 +01:00
event-bus Merge release branch 4.20 to main 2025-01-08 14:01:19 +01:00
ha-planners/skip-heurestics Updating pom.xml version numbers for release 4.21.0.0-SNAPSHOT 2024-11-27 11:47:06 -03:00
host-allocators/random Merge release branch 4.20 to main 2025-01-08 14:01:19 +01:00
hypervisors Merge branch '4.20' 2025-02-12 16:54:05 +01:00
integrations Fix NPE during kubernetes cluster creation when network has rules with ports saved as null on DB (#9223) 2025-02-13 10:25:16 +01:00
maintenance Support for Management Server Maintenance Mode (#9854) 2025-01-29 13:31:15 +05:30
metrics Support multi-scope configuration settings (#10300) 2025-02-14 11:25:01 +05:30
network-elements Merge remote-tracking branch 'apache/4.20' 2025-01-31 16:55:38 +05:30
outofbandmanagement-drivers Updating pom.xml version numbers for release 4.21.0.0-SNAPSHOT 2024-11-27 11:47:06 -03:00
storage Support multi-scope configuration settings (#10300) 2025-02-14 11:25:01 +05:30
storage-allocators/random Updating pom.xml version numbers for release 4.21.0.0-SNAPSHOT 2024-11-27 11:47:06 -03:00
user-authenticators Merge release branch 4.20 to main 2025-01-08 14:01:19 +01:00
user-two-factor-authenticators Updating pom.xml version numbers for release 4.21.0.0-SNAPSHOT 2024-11-27 11:47:06 -03:00
pom.xml Support for Management Server Maintenance Mode (#9854) 2025-01-29 13:31:15 +05:30