systemvm-template: support on-demand download during setup and registration
Description
Bundling all hypervisor SystemVM templates in release packages simplifies installs but inflates build time and package size. This change enables downloading templates on demand when they’re not found after package installation. The download path is wired into both cloud-setup-management and the existing SystemVM template registration flow.
cloudstack-setup-management allows the argument --systemvm-templates to download the desired hypervisor system template during management server setup.
For air-gapped environments, a repository URL prefix can be provided to support air-gapped setups: pass --systemvm-templates-repository <URL-prefix> to cloudstack-setup-management, or set system.vm.templates.download.repository=<URL-prefix> in server.properties for post-setup registration. Currently, custom repository should mirror the file structure of the official repository, ie, <BASE_VERSION>/systemvmtemplate-<VERSION>-<ARCH>-<HYPERVISOR>.<FILE_EXTENSION>
If templates are already present (bundled or preseeded), behavior is unchanged and no download is attempted.
Documentation PR: https://github.com/apache/cloudstack-documentation/pull/580
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)
- [ ] 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?
Codecov Report
:x: Patch coverage is 74.00000% with 117 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 17.55%. Comparing base (51910cd) to head (b0dd56f).
:warning: Report is 4 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #11656 +/- ##
============================================
+ Coverage 17.46% 17.55% +0.09%
- Complexity 15515 15600 +85
============================================
Files 5913 5914 +1
Lines 529371 529481 +110
Branches 64670 64691 +21
============================================
+ Hits 92450 92973 +523
+ Misses 426503 426072 -431
- Partials 10418 10436 +18
| Flag | Coverage Δ | |
|---|---|---|
| uitests | 3.58% <ø> (-0.01%) |
:arrow_down: |
| unittests | 18.62% <74.00%> (+0.10%) |
: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.
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.
@blueorangutan package
@shwstppr 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 15214
@blueorangutan package
@shwstppr 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 15431
@blueorangutan newpackage
@shwstppr 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 15568
@blueorangutan newpackage
@shwstppr 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.
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15571
@blueorangutan newpackage
@shwstppr 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.
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15576
@blueorangutan test
@shwstppr a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests
[SF] Trillian test result (tid-14736) Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8 Total time taken: 64859 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr11656-t14736-kvm-ol8.zip Smoke tests completed. 145 look OK, 2 have errors, 2 did not run Only failed and skipped tests results shown below:
| Test | Result | Time (s) | Test File |
|---|---|---|---|
| ContextSuite context=TestClusterDRS>:setup | Error |
0.00 | test_cluster_drs.py |
| test_01_redundant_vpc_site2site_vpn | Failure |
501.30 | test_vpc_vpn.py |
| all_test_human_readable_logs | Skipped |
--- | test_human_readable_logs.py |
| all_test_image_store_object_migration | Skipped |
--- | test_image_store_object_migration.py |
@blueorangutan test keepEnv
@shwstppr a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests
[SF] Trillian test result (tid-14746) Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8 Total time taken: 70380 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr11656-t14746-kvm-ol8.zip Smoke tests completed. 146 look OK, 1 have errors, 2 did not run Only failed and skipped tests results shown below:
| Test | Result | Time (s) | Test File |
|---|---|---|---|
| test_01_redundant_vpc_site2site_vpn | Failure |
456.19 | test_vpc_vpn.py |
| all_test_human_readable_logs | Skipped |
--- | test_human_readable_logs.py |
| all_test_image_store_object_migration | Skipped |
--- | test_image_store_object_migration.py |
Thanks @sureshanaparti for the review, I've addressed your comments
@blueorangutan package
@shwstppr 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 15708
@blueorangutan newpackage
@shwstppr 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.
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15725
@blueorangutan newpackage