-
Notifications
You must be signed in to change notification settings - Fork 1.2k
systemvm-template: support on-demand download during setup and registration #11656
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: main
Are you sure you want to change the base?
Conversation
5c41125 to
df47ea1
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #11656 +/- ##
=========================================
Coverage 17.56% 17.57%
- Complexity 15540 15546 +6
=========================================
Files 5909 5910 +1
Lines 529045 529088 +43
Branches 64615 64623 +8
=========================================
+ Hits 92933 92962 +29
- Misses 425657 425668 +11
- Partials 10455 10458 +3
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:
|
…ration Bundling all hypervisor SystemVM templates in release packages simplifies installs but inflates build time and artifact 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. For connected or mirrored environments, a repository URL prefix can be provided to support air-gapped setups: pass --systemvm-templates-repository <URL-prefix> to cloud-setup-management, or set system.vm.templates.download.repository=<URL-prefix> in server.properties for post-setup registration. If templates are already present (bundled or preseeded), behavior is unchanged and no download is attempted. Signed-off-by: Abhishek Kumar <[email protected]>
df47ea1 to
efdea06
Compare
|
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 |
Signed-off-by: Abhishek Kumar <[email protected]>
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.
Pull Request Overview
This PR enhances CloudStack's SystemVM template handling by enabling on-demand downloading of templates during setup and registration, reducing package size and build time. The implementation supports both regular and air-gapped environments through configurable repository URLs.
- Adds on-demand SystemVM template downloading capability with checksum verification
- Refactors template metadata handling to support custom download repositories
- Implements centralized server properties utility for configuration management
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| utils/src/main/java/org/apache/cloudstack/utils/server/ServerPropertiesUtil.java | New utility class for centralized server.properties access with thread-safe caching |
| plugins/hypervisors/external/src/main/java/org/apache/cloudstack/hypervisor/external/provisioner/ExternalPathPayloadProvisioner.java | Refactored to use new ServerPropertiesUtil instead of duplicated property loading logic |
| engine/schema/templateConfig.sh | Enhanced template metadata generation with repository URL support and refactored template specification structure |
| engine/schema/src/test/java/com/cloud/upgrade/SystemVmTemplateRegistrationTest.java | Updated test case to use VMware/arm64 combination instead of KVM/amd64 |
| engine/schema/src/main/java/com/cloud/upgrade/SystemVmTemplateRegistration.java | Added support for custom download repository configuration and URL replacement logic |
| client/conf/server.properties.in | Added configuration property for custom SystemVM template repository URL |
| client/bindir/cloud-setup-management.in | Implemented comprehensive template download functionality with metadata parsing and checksum verification |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Signed-off-by: Abhishek Kumar <[email protected]>
|
@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. |
Related apache/cloudstack#11656 Signed-off-by: Abhishek Kumar <[email protected]>
|
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. |
Signed-off-by: Abhishek Kumar <[email protected]>
|
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 |
Signed-off-by: Abhishek Kumar <[email protected]>
|
@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)
|
|
@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)
|
Description
Bundling all hypervisor SystemVM templates in release packages simplifies installs but inflates build time and pacakge 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-managementallows the argument--systemvm-templatesto 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 setsystem.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: apache/cloudstack-documentation#580
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?