Consider secondary storage selectors during template synchronization
Description
The secondary storage selectors allow operators to specify, for instance, that templates should go to secondary storage A and snapshots to secondary storage B. When registering a template, it will be downloaded only to secondary storage A.
During the startup of the SSVM's service, the MS executes a template synchronization process to verify what templates are in which secondary storage in order to download them to secondary storages in which they do not exist. However, this process does not consider the secondary storage selectors. Hence, templates will be downloaded to secondary storage B.
This PR makes the MS consider the secondary storage selectors during the template synchronization process.
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)
- [X] Enhancement (improves an existing feature and functionality)
- [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
- [ ] Major
- [X] Minor
How Has This Been Tested?
-
I created a secondary storage selector directing templates to secondary storage A, and another directing snapshots to secondary storage B.
-
I registered two new templates. Both were downloaded only to secondary storage A.
-
I restarted the SSVM's service. I validated that the MS did not begin downloading the two templates to secondary storage B.
-
I took some volume snapshots. I validated that they went to secondary storage B.
-
I removed the selector that was directing templates to secondary storage A, and restarted the SSVM's service. I validated that they were downloaded to secondary storage B.
@blueorangutan package
Codecov Report
:x: Patch coverage is 90.32258% with 3 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 16.15%. Comparing base (823080c) to head (3fc1356).
:warning: Report is 163 commits behind head on 4.20.
Additional details and impacted files
@@ Coverage Diff @@
## 4.20 #10956 +/- ##
=========================================
Coverage 16.14% 16.15%
- Complexity 13253 13259 +6
=========================================
Files 5656 5656
Lines 497893 497906 +13
Branches 60374 60376 +2
=========================================
+ Hits 80405 80419 +14
+ Misses 408529 408523 -6
- Partials 8959 8964 +5
| Flag | Coverage Δ | |
|---|---|---|
| uitests | 4.00% <ø> (ø) |
|
| unittests | 17.00% <90.32%> (+<0.01%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
@blueorangutan package
@sureshanaparti 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 13610
@blueorangutan package
@DaanHoogland 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 13666
@blueorangutan test
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests
[SF] Trillian test result (tid-13499) Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8 Total time taken: 54526 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr10956-t13499-kvm-ol8.zip Smoke tests completed. 136 look OK, 0 have errors, 5 did not run Only failed and skipped tests results shown below:
| Test | Result | Time (s) | Test File |
|---|---|---|---|
| all_test_vpc_vpn | Skipped |
--- | test_vpc_vpn.py |
| all_test_webhook_delivery | Skipped |
--- | test_webhook_delivery.py |
| all_test_webhook_lifecycle | Skipped |
--- | test_webhook_lifecycle.py |
| all_test_host_maintenance | Skipped |
--- | test_host_maintenance.py |
| all_test_hostha_kvm | Skipped |
--- | test_hostha_kvm.py |
@blueorangutan package
@weizhouapache 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 14955
@blueorangutan test
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests
[SF] Trillian test result (tid-14332) Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8 Total time taken: 54052 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr10956-t14332-kvm-ol8.zip Smoke tests completed. 141 look OK, 0 have errors, 0 did not run Only failed and skipped tests results shown below:
| Test | Result | Time (s) | Test File |
|---|