-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[Multi-Arch] Select Template Arch when creating template from volume #11068
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
[Multi-Arch] Select Template Arch when creating template from volume #11068
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.20 #11068 +/- ##
============================================
- Coverage 16.16% 16.16% -0.01%
Complexity 13278 13278
============================================
Files 5656 5656
Lines 497813 497884 +71
Branches 60373 60378 +5
============================================
+ Hits 80458 80461 +3
- Misses 408401 408468 +67
- Partials 8954 8955 +1
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 |
|
@nvazquez 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 13865 |
api/src/main/java/org/apache/cloudstack/api/command/user/template/CreateTemplateCmd.java
Outdated
Show resolved
Hide resolved
…ate/CreateTemplateCmd.java Co-authored-by: Abhishek Kumar <[email protected]>
|
@blueorangutan package |
|
@nvazquez 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 13870 |
DaanHoogland
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.
clgtm
shwstppr
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
|
@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-13639)
|
|
|
||
| @Parameter(name = ApiConstants.ARCH, type = CommandType.STRING, | ||
| description = "the CPU arch of the template. Valid options are: x86_64, aarch64", | ||
| since = "4.20.2") |
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.
| since = "4.20.2") | |
| since = "4.21.0") |
if this is part of 4.21
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.
it is based off of 4.20 @sureshanaparti , I think it is good like this.
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.
@DaanHoogland is it ok if it goes in 4.21 first (before 4.20.2)?
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.
if both versions are to use the same template (which it looks like ti is going to be).
sureshanaparti
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.
clgtm
|
@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 14322 |
|
@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 14333 |
|
@vishesh92 a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress. |
api/src/main/java/org/apache/cloudstack/api/command/user/template/CreateTemplateCmd.java
Outdated
Show resolved
Hide resolved
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 the template creation feature to allow users to select the CPU architecture when creating a template from a volume, addressing the limitation where templates were always created with x86_64 architecture regardless of the source volume's architecture.
- Adds architecture selection dropdown to the UI template creation form
- Modifies the backend API to accept and process the architecture parameter
- Updates the template creation logic to use the specified architecture instead of defaulting to x86_64
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| ui/src/views/storage/CreateTemplate.vue | Adds architecture selection dropdown with CPU architecture types fetched from the store |
| api/src/main/java/org/apache/cloudstack/api/command/user/template/CreateTemplateCmd.java | Adds arch parameter to the CreateTemplateCmd API with validation |
| server/src/main/java/com/cloud/template/TemplateManagerImpl.java | Updates template creation logic to use the provided architecture instead of hardcoded x86_64 |
api/src/main/java/org/apache/cloudstack/api/command/user/template/CreateTemplateCmd.java
Show resolved
Hide resolved
|
UI build: ✔️ |
vishesh92
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.
Just one minor comment. Otherwise code looks good to me.
…ate/CreateTemplateCmd.java Co-authored-by: Vishesh <[email protected]>
|
Thanks @vishesh92 - comment addressed @blueorangutan package |
|
@nvazquez 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 14419 |
|
@blueorangutan test |
|
@nvazquez a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-13941)
|
…pache#11068) Co-authored-by: Abhishek Kumar <[email protected]> Co-authored-by: Suresh Kumar Anaparti <[email protected]> Co-authored-by: Vishesh <[email protected]>
Description
This PR allows selecting the template arch when creating a template from volume
(the created template was always x86_64 and could be edited after its creation)
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
Tested on Multi-Arch zone with 2 clusters each one with arch: x86_64 and aarch64
Create template from volume of an aarch 64 VM -> select aarch64 arch -> verify the created template arch
How did you try to break this feature and the system with this change?