Skip to content

Conversation

@nvazquez
Copy link
Contributor

Description

This PR allows selecting the template arch when creating a template from volume

Screenshot 2025-06-21 at 14 18 21

(the created template was always x86_64 and could be edited after its creation)

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)
  • 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?

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?

@codecov
Copy link

codecov bot commented Jun 21, 2025

Codecov Report

❌ Patch coverage is 25.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 16.16%. Comparing base (1b74c2d) to head (017296a).
⚠️ Report is 18 commits behind head on 4.20.

Files with missing lines Patch % Lines
...k/api/command/user/template/CreateTemplateCmd.java 0.00% 3 Missing ⚠️
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     
Flag Coverage Δ
uitests 4.00% <ø> (ø)
unittests 17.01% <25.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@nvazquez
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

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

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 13865

…ate/CreateTemplateCmd.java

Co-authored-by: Abhishek Kumar <[email protected]>
@nvazquez
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

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

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 13870

Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clgtm

Copy link
Contributor

@shwstppr shwstppr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM

@shwstppr
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

@shwstppr a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@blueorangutan
Copy link

[SF] Trillian test result (tid-13639)
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 62788 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr11068-t13639-kvm-ol8.zip
Smoke tests completed. 140 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
ContextSuite context=TestISO>:setup Error 1565.91 test_iso.py


@Parameter(name = ApiConstants.ARCH, type = CommandType.STRING,
description = "the CPU arch of the template. Valid options are: x86_64, aarch64",
since = "4.20.2")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
since = "4.20.2")
since = "4.21.0")

if this is part of 4.21

Copy link
Contributor

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.

Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor

@sureshanaparti sureshanaparti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clgtm

@sureshanaparti
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

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

@blueorangutan
Copy link

Packaging result [SF]: ✖️ el8 ✖️ el9 ✔️ debian ✖️ suse15. SL-JID 14322

@sureshanaparti
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

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

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 14333

@vishesh92
Copy link
Member

@blueorangutan ui

@blueorangutan
Copy link

@vishesh92 a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

@vishesh92 vishesh92 requested a review from Copilot July 26, 2025 07:59
Copy link
Contributor

Copilot AI left a 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

@blueorangutan
Copy link

UI build: ✔️
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/11068 (QA-JID-690)

Copy link
Member

@vishesh92 vishesh92 left a 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.

@nvazquez
Copy link
Contributor Author

Thanks @vishesh92 - comment addressed

@blueorangutan package

@blueorangutan
Copy link

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

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 14419

@nvazquez
Copy link
Contributor Author

@blueorangutan test

@blueorangutan
Copy link

@nvazquez a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@blueorangutan
Copy link

[SF] Trillian test result (tid-13941)
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 58805 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr11068-t13941-kvm-ol8.zip
Smoke tests completed. 140 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_08_arping_in_ssvm Failure 5.22 test_diagnostics.py
test_09_arping_in_cpvm Failure 5.22 test_diagnostics.py

@DaanHoogland DaanHoogland merged commit 8756be5 into apache:4.20 Jul 29, 2025
26 checks passed
@DaanHoogland DaanHoogland deleted the 420-multiarch-createtmpl-fromvol branch July 29, 2025 09:41
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Aug 6, 2025
…pache#11068)

Co-authored-by: Abhishek Kumar <[email protected]>
Co-authored-by: Suresh Kumar Anaparti <[email protected]>
Co-authored-by: Vishesh <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants