-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
base: 4.20
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is 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
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 |
|
@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. |
|
@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? |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 16636 |
|
@blueorangutan package |
|
@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. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 16639 |
api/src/main/java/org/apache/cloudstack/backup/BackupManager.java
Outdated
Show resolved
Hide resolved
api/src/main/java/org/apache/cloudstack/backup/BackupManager.java
Outdated
Show resolved
Hide resolved
api/src/main/java/org/apache/cloudstack/backup/BackupManager.java
Outdated
Show resolved
Hide resolved
api/src/main/java/org/apache/cloudstack/backup/BackupManager.java
Outdated
Show resolved
Hide resolved
framework/config/src/main/java/org/apache/cloudstack/framework/config/ValidatedConfigKey.java
Outdated
Show resolved
Hide resolved
|
abh1sar
left a comment
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.
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)); |
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.
| 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(","); |
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.
This is not possible now, right?
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.
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)




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.
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?