Skip to content

config cleanup - #13884

Open
DaanHoogland wants to merge 49 commits into
mainfrom
ghi10752-configCleanup
Open

config cleanup#13884
DaanHoogland wants to merge 49 commits into
mainfrom
ghi10752-configCleanup

Conversation

@DaanHoogland

Copy link
Copy Markdown
Contributor

Description

This PR tries to get rid of the Config enum or the old mechanism to define configuration items, which is long overdue. The change should be transparent, but is huge so good regression testing is required. And merg early in the release cycle is recommended.
Commits are being done in batches for review convenience. They could have been done in separate PRs but in the end the changes are rather trivial.

Fixes: #10752

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

This comment was marked as duplicate.

@codecov

codecov Bot commented Aug 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 41.70096% with 425 lines in your changes missing coverage. Please review.
✅ Project coverage is 19.79%. Comparing base (b7a834b) to head (7f55790).

Files with missing lines Patch % Lines
...java/com/cloud/server/ConfigurationServerImpl.java 0.00% 46 Missing ⚠️
.../cloud/resourcelimit/ResourceLimitManagerImpl.java 0.00% 31 Missing ⚠️
...oud/network/lb/ElasticLoadBalancerManagerImpl.java 5.55% 17 Missing ⚠️
.../cloud/configuration/ConfigurationManagerImpl.java 42.30% 13 Missing and 2 partials ⚠️
...ork/router/VirtualNetworkApplianceManagerImpl.java 0.00% 13 Missing ⚠️
...isor/xenserver/discoverer/XcpServerDiscoverer.java 0.00% 11 Missing ⚠️
...ava/com/cloud/network/NetworkUsageManagerImpl.java 0.00% 10 Missing ⚠️
...rc/main/java/com/cloud/usage/UsageServiceImpl.java 0.00% 10 Missing ⚠️
...oud/network/ExternalFirewallDeviceManagerImpl.java 0.00% 9 Missing ⚠️
...ain/java/com/cloud/network/NetworkServiceImpl.java 0.00% 9 Missing ⚠️
... and 100 more
Additional details and impacted files
@@            Coverage Diff            @@
##               main   #13884   +/-   ##
=========================================
  Coverage     19.78%   19.79%           
- Complexity    19998    20018   +20     
=========================================
  Files          6371     6387   +16     
  Lines        575899   575896    -3     
  Branches      70495    70475   -20     
=========================================
+ Hits         113967   114000   +33     
+ Misses       449501   449462   -39     
- Partials      12431    12434    +3     
Flag Coverage Δ
uitests 3.53% <ø> (ø)
unittests 21.07% <41.70%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Aug 15, 2026

Copy link
Copy Markdown

🔴 Test Coverage Grade: D — Marginal

Metric Value
Line coverage 24.69%
Branch coverage 18.92%

Grade Scale

Grade Line Coverage Meaning
🟢 A ≥ 80% Excellent - this code sleeps well at night 😴
🟡 B 60-79% Good - almost there, don't stop now 😉
🟠 C 40-59% Acceptable - your code is wearing a seatbelt, but no airbags 😬
🔴 D 20-39% Marginal - boldly shipping where no test has gone before 🖖
⛔ F < 20% Failing - tests? what tests? 🔥

Branch coverage is shown as a secondary signal. Grade is determined by line coverage.
View full Actions run

This comment was marked as duplicate.

Copilot AI review requested due to automatic review settings August 15, 2026 15:49

This comment was marked as duplicate.

Copilot AI review requested due to automatic review settings August 15, 2026 16:07

This comment was marked as duplicate.

Copilot AI review requested due to automatic review settings August 15, 2026 19:40
@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 18911

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian Build Failed (tid-16787)

@github-actions

Copy link
Copy Markdown

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian Build Failed (tid-16808)

@DaanHoogland DaanHoogland moved this from Backlog to conflict/waiting in CloudStack Testing Sep 1, 2026
@blueorangutan

Copy link
Copy Markdown

[SF] Trillian Build Failed (tid-16861)

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian test result (tid-16866)
Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 62652 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr13884-t16866-kvm-ol8.zip
Smoke tests completed. 156 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File

@DaanHoogland
DaanHoogland marked this pull request as ready for review September 2, 2026 07:18
Copilot AI review requested due to automatic review settings September 2, 2026 07:18
@DaanHoogland

Copy link
Copy Markdown
Contributor Author

@nvazquez @vladimirpetrov , this is the one I spoke about that needs to go in early in the cycle. cc @weizhouapache @winterhazel

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The change set refactors configuration access across many subsystems, so correctness depends on broad regression testing and careful review of the new ConfigKey definitions and registrations.

Review details
  • Files reviewed: 166/166 changed files
  • Comments generated: 6
  • Review effort level: Lite

Comment on lines +182 to +186
ConfigKey<Integer> VmDiskThrottlingBytesReadRate = new ConfigKey<>("Advanced", Integer.class, "vm.disk.throttling.bytes_read_rate", "0",
"Default disk I/O read rate in bytes per second allowed in User vm's disk.", true);

ConfigKey<Integer> VmDiskThrottlingBytesWriteRate = new ConfigKey<>("Advanced", Integer.class, "vm.disk.throttling.bytes_write_rate", "0",
"Default disk I/O writerate in bytes per second allowed in User vm's disk.", true);
Comment on lines +46 to +47
ConfigKey<String> BaremetalIpmiRetryTimes = new ConfigKey<>("Advanced", String.class, "baremetal.ipmi.fail.retry", "5",
"ipmi interface will be temporary out of order after power operations(e.g. cycle, on), it leads following commands fail immediately. The value specifies retry times before accounting it as real failure", true);
Comment on lines +39 to +40
ConfigKey<String> DefaultExternalFirewallCapacity = new ConfigKey<>("Advanced", String.class, "external.firewall.default.capacity", "50",
"default number of networks permitted per external load firewall device", true);
Comment on lines +41 to +42
ConfigKey<String> DefaultExternalLoadBalancerCapacity = new ConfigKey<>("Advanced", String.class, "external.lb.default.capacity", "50",
"default number of networks permitted per external load balancer device", true);
"After starting provision process, periodcially echo security agent installed in the template. Treat provisioning as success only if echo successfully", true);

ConfigKey<String> BaremetalIpmiLanInterface = new ConfigKey<>("Advanced", String.class, "baremetal.ipmi.lan.interface", "default",
"option specified in -I option of impitool. candidates are: open/bmc/lipmi/lan/lanplus/free/imb, see ipmitool man page for details. default value 'default' means using default option of ipmitool", true);
"The mount point on the Management Server for Secondary Storage.", true);

ConfigKey<Boolean> SystemVMAutoReserveCapacity = new ConfigKey<>("Advanced", Boolean.class, "system.vm.auto.reserve.capacity", "true",
"Indicates whether or not to automatically reserver system VM standby capacity.", true);
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

Copilot AI review requested due to automatic review settings September 2, 2026 18:22
@DaanHoogland

Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@DaanHoogland 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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

There are confirmed correctness issues (e.g., a missing AgentManager import causing a compilation failure) and at least one behavior-affecting config read change that should be reconciled before merge.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details

Suppressed comments (1)

server/src/main/java/com/cloud/storage/secondary/SecondaryStorageVmManager.java:60

  • Typo in the config description string: "reserver" should be "reserve".
  • Files reviewed: 166/166 changed files
  • Comments generated: 2
  • Review effort level: Lite

(srcdata.getType() == DataObjectType.VOLUME && destData.getType() == DataObjectType.VOLUME)) {

int nMaxExecutionMinutes = NumbersUtil.parseInt(configDao.getValue(Config.SecStorageCmdExecutionTimeMax.key()), 30);
int nMaxExecutionMinutes = AgentManager.SecStorageCmdExecutionTimeMax.value();
Comment on lines +233 to +237
String execTime = UsageService.UsageStatsJobExecTime.value();
Integer aggregationRange = UsageService.UsageStatsJobAggregationRange.value();
String execTimeZone = UsageService.UsageExecutionTimezone.value();
String aggregationTimeZone = UsageService.UsageAggregationTimezone.value();
Integer sanityCheckInterval = UsageService.UsageSanityCheckInterval.value();
@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 19070

@sonarqubecloud

sonarqubecloud Bot commented Sep 2, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
26.3% Coverage on New Code (required ≥ 40%)
C Reliability Rating on New Code (required ≥ B)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: conflict/waiting

Development

Successfully merging this pull request may close these issues.

phase out enum Config

4 participants