Skip to content

New Feature: Multi-arch Zones#9619

Merged
yadvr merged 24 commits intoapache:mainfrom
shapeblue:420-multiarch
Sep 6, 2024
Merged

New Feature: Multi-arch Zones#9619
yadvr merged 24 commits intoapache:mainfrom
shapeblue:420-multiarch

Conversation

@nvazquez
Copy link
Copy Markdown
Contributor

Description

This PR introduces the multi-arch zones, allowing users to select the VM arch upon deployment.

Multi-arch zone support in CloudStack can allow admins to mix x86_64 & arm64 hosts within the same zone with the following changes proposed:

  • All hosts in a clusters need to be homogenous, wrt host CPU type (amd64 vs arm64) and hypevisor
  • Arch-aware templates & ISOs:
    • Add support for a new arch field (default set of: amd64 and arm64), when unspecified defaults to amd64 and for existing templates & iso
    • Allow admins to edit the arch type of the registered template & iso
  • Arch-aware clusters and host:
    • Add new attribute field for cluster and hosts (kvm host agents can automatically report this, arch of the first host of the cluster is cluster's architecture), defaults to amd64 when not specified
    • Allow admins to edit the arch of an existing cluster
  • VM deployment form (UI):
    • In a multi-arch zone/env, the VM deployment form can allow some kind of template/iso filtration in the UI
    • Users should be able to select arch: amd64 & arm64; but this is shown only in a multi-arch zone (env)
  • VM orchestration and lifecycle operations:
    • Use of VM/template's arch to correctly decide where to provision the VM (on the correct strictly arch-matching host/clusters) & other lifecycle operations (such as migration from/to arch-matching hosts)

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

Screenshot 2024-08-31 at 16 52 57

How Has This Been Tested?

How did you try to break this feature and the system with this change?

@nvazquez
Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

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

@codecov
Copy link
Copy Markdown

codecov bot commented Aug 31, 2024

Codecov Report

Attention: Patch coverage is 15.05376% with 237 lines in your changes missing coverage. Please review.

Project coverage is 15.76%. Comparing base (679ce1a) to head (daec7bc).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
api/src/main/java/com/cloud/cpu/CPU.java 40.00% 15 Missing ⚠️
...n/java/com/cloud/resource/ResourceManagerImpl.java 0.00% 14 Missing ⚠️
agent/src/main/java/com/cloud/agent/Agent.java 0.00% 13 Missing ⚠️
...src/main/java/com/cloud/dc/dao/ClusterDaoImpl.java 40.00% 12 Missing ⚠️
...java/com/cloud/agent/manager/AgentManagerImpl.java 0.00% 10 Missing ⚠️
...n/java/com/cloud/template/TemplateAdapterBase.java 0.00% 9 Missing ⚠️
...a/org/apache/cloudstack/util/CPUArchConverter.java 0.00% 7 Missing ⚠️
.../cloud/storage/upload/params/UploadParamsBase.java 0.00% 7 Missing ⚠️
...pache/cloudstack/api/response/ClusterResponse.java 0.00% 6 Missing ⚠️
...g/apache/cloudstack/api/response/HostResponse.java 0.00% 6 Missing ⚠️
... and 35 more
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #9619      +/-   ##
============================================
- Coverage     15.76%   15.76%   -0.01%     
- Complexity    12507    12510       +3     
============================================
  Files          5619     5621       +2     
  Lines        491158   491471     +313     
  Branches      62973    60171    -2802     
============================================
+ Hits          77419    77460      +41     
- Misses       405283   405555     +272     
  Partials       8456     8456              
Flag Coverage Δ
uitests 4.04% <ø> (-0.01%) ⬇️
unittests 16.57% <15.05%> (-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.

@blueorangutan
Copy link
Copy Markdown

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

@nvazquez
Copy link
Copy Markdown
Contributor Author

@blueorangutan ui

@DaanHoogland
Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

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

@blueorangutan
Copy link
Copy Markdown

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

@yadvr
Copy link
Copy Markdown
Member

yadvr commented Sep 5, 2024

Minor conflict (no need for repackaging though), pl address @nvazquez

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

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

@github-actions
Copy link
Copy Markdown

github-actions bot commented Sep 5, 2024

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

@yadvr
Copy link
Copy Markdown
Member

yadvr commented Sep 5, 2024

cc @nvazquez hope I haven't screwed up 🤞 the merge conflict

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

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

@apache apache deleted a comment from blueorangutan Sep 5, 2024
@blueorangutan
Copy link
Copy Markdown

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

@yadvr
Copy link
Copy Markdown
Member

yadvr commented Sep 5, 2024

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

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

@yadvr
Copy link
Copy Markdown
Member

yadvr commented Sep 6, 2024

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@rohityadavcloud 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
Copy Markdown

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

Copy link
Copy Markdown
Member

@kiranchavala kiranchavala left a comment

Choose a reason for hiding this comment

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

LGTM,

Tested the feature

Able to register/update the template, iso, kubernetes iso based on architecture.

The architecture details of the template,iso are mentioned in the UI

Able to update the cluster based on the architecture

Screenshot 2024-09-06 at 12 08 03 PM
Screenshot 2024-09-06 at 12 07 53 PM
Screenshot 2024-09-06 at 12 07 42 PM
Screenshot 2024-09-06 at 12 09 30 PM
Screenshot 2024-09-06 at 12 10 09 PM

@yadvr yadvr merged commit 8c8d115 into apache:main Sep 6, 2024
@yadvr yadvr deleted the 420-multiarch branch September 6, 2024 06:44
@blueorangutan
Copy link
Copy Markdown

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

Test Result Time (s) Test File
test_mount_shared_fs Failure 93.24 test_sharedfs_lifecycle.py
test_resize_shared_fs Error 0.23 test_sharedfs_lifecycle.py
all_test_network Skipped --- test_network.py
all_test_nic_adapter_type Skipped --- test_nic_adapter_type.py

dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Sep 6, 2024
This introduces the multi-arch zones, allowing users to select the VM arch upon deployment.

Multi-arch zone support in CloudStack can allow admins to mix x86_64 & arm64 hosts within the same zone with the following changes proposed:
- All hosts in a clusters need to be homogenous, wrt host CPU type (amd64 vs arm64) and hypevisor
- Arch-aware templates & ISOs:
   -  Add support for a new arch field (default set of: amd64 and arm64), when unspecified defaults to amd64 and for existing templates & iso
   -  Allow admins to edit the arch type of the registered template & iso
- Arch-aware clusters and host:
   - Add new attribute field for cluster and hosts (kvm host agents can automatically report this, arch of the first host of the cluster is cluster's architecture), defaults to amd64 when not specified
   - Allow admins to edit the arch of an existing cluster
- VM deployment form (UI):
   - In a multi-arch zone/env, the VM deployment form can allow some kind of template/iso filtration in the UI
   - Users should be able to select arch: amd64 & arm64; but this is shown only in a multi-arch zone (env)
- VM orchestration and lifecycle operations:
   - Use of VM/template's arch to correctly decide where to provision the VM (on the correct strictly arch-matching host/clusters) & other lifecycle operations (such as migration from/to arch-matching hosts)

Co-authored-by: Rohit Yadav <rohit.yadav@shapeblue.com>
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