Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fixes issue with loading Capacity dashboard when mulitple backup providers configured #12550

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

Open
Pearl1594 wants to merge 6 commits into 4.20
base: 4.20
Choose a base branch
Loading
from ghi12449-capDashboard-multipleBackupProv

Conversation

@Pearl1594
Copy link
Contributor

@Pearl1594 Pearl1594 commented Jan 29, 2026
edited
Loading

Description

This PR fixed: #12449
The capacity dashboard issue is seen on 4.22 - but in general the getBackupProvider() is fixed to return the first provider set in the global settings when a comma separated list of providers is set.

94ac3ea - adds a validator, that prevents adding a comma separated list for backup provider setting. It also checks if the entered value is a valid one.

image image

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?

sudo87 and shwstppr reacted with thumbs up emoji
Copy link

codecov bot commented Jan 29, 2026
edited
Loading

Codecov Report

❌ Patch coverage is 18.51852% with 22 lines in your changes missing coverage. Please review.
✅ Project coverage is 16.36%. Comparing base (a6ccde4) to head (0669ac3).
⚠️ Report is 5 commits behind head on 4.20.

Files with missing lines Patch % Lines
...loudstack/framework/config/ValidatedConfigKey.java 27.27% 8 Missing ⚠️
...va/org/apache/cloudstack/backup/BackupManager.java 22.22% 7 Missing ⚠️
.../cloud/configuration/ConfigurationManagerImpl.java 0.00% 4 Missing ⚠️
...rg/apache/cloudstack/backup/BackupManagerImpl.java 0.00% 3 Missing ⚠️
Additional details and impacted files
@@ Coverage Diff @@
## 4.20 #12550 +/- ##
============================================
+ Coverage 16.26% 16.36% +0.09% 
- Complexity 13428 13595 +167 
============================================
 Files 5660 5661 +1 
 Lines 499907 502016 +2109 
 Branches 60696 61663 +967 
============================================
+ Hits 81316 82156 +840 
- Misses 409521 410731 +1210 
- Partials 9070 9129 +59 
Flag Coverage Δ
uitests 5.07% <ø> (+0.91%) ⬆️
unittests 17.16% <18.51%> (+0.04%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 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.

Copy link
Contributor Author

@blueorangutan package

Copy link

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

Copy link
Contributor Author

@abh1sar @DaanHoogland I've added this bit : 94ac3ea to add a validator that can be used for any configuration. Do you think this is useful?

Copy link

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

Copy link
Contributor Author

@blueorangutan package

Copy link

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

Copy link

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

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 40%)
C Maintainability 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

Copy link
Collaborator

@abh1sar abh1sar left a comment

Choose a reason for hiding this comment

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

Code LGTM.
just a few nitpicks.

"dummy",
"The backup and recovery provider plugin.", true, ConfigKey.Scope.Zone, BackupFrameworkEnabled.key());
"The backup and recovery provider plugin. Valid plugin values: dummy, veeam, networker and nas",
true, ConfigKey.Scope.Zone, BackupFrameworkEnabled.key(), value -> validateBackupProviderConfig((String)value));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
true, ConfigKey.Scope.Zone, BackupFrameworkEnabled.key(), value -> validateBackupProviderConfig((String)value));
true, ConfigKey.Scope.Zone, BackupFrameworkEnabled.key(), value -> validateBackupProviderConfig((String)value));

throw new CloudRuntimeException("Invalid backup provider name provided");
}
if (!backupProvidersMap.containsKey(name)) {
String[] backupProviderNames = name.split(",");
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is not possible now, right?

Copy link
Contributor Author

@Pearl1594 Pearl1594 Jan 30, 2026

Choose a reason for hiding this comment

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

I don't think so, currently, ACS allows taking any string as input, so if we provide a comma separated string, it would compare that with providers supported in ACS, and would fail and report Cannot find backup provider by name: dummy,nas (if both were set)

Copy link
Collaborator

@abh1sar abh1sar Feb 1, 2026

Choose a reason for hiding this comment

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

I meant that validator will not allow , in the name, so no need for splitting the name by comma. We can revert to old code.

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

Reviewers

@shwstppr shwstppr shwstppr left review comments

@DaanHoogland DaanHoogland Awaiting requested review from DaanHoogland

+1 more reviewer

@abh1sar abh1sar abh1sar approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

4.20.3

Development

Successfully merging this pull request may close these issues.

Capacity dashboard doesn't load if incorrect backup.framework.provider.plugin value is given

AltStyle によって変換されたページ (->オリジナル) /