Skip to content

Conversation

@niyamsw
Copy link
Contributor

@niyamsw niyamsw commented Dec 4, 2024

Description

This PR introduces support for cloudstack-agent on KVM on the s390x and cloudstack-management-server on s390x architecture.
KVM is supported on s390x (IBM Z and LinuxONE) architecture, Linux KVM Processor Support Page.
I have built a new s390x version of the System VM template: [ Refer: s390x Build instructions and System VM Template guide.]
I have tested the deployment of VMs and confirmed that the Virtual Router (VR), SSVM, Console Proxy functionalities worked as expected.
Testing was performed with Debian 11 templates that are compatible with s390x in CloudStack.
I have tested with agent and management server on the following distributions:

  • RHEL
  • Ubuntu
  • SLES

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

image
image

How Has This Been Tested?

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

Signed-off-by: Niyam Siwach <[email protected]>
Signed-off-by: Himanshu Mishra <[email protected]>
@boring-cyborg
Copy link

boring-cyborg bot commented Dec 4, 2024

Congratulations on your first Pull Request and welcome to the Apache CloudStack community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md)
Here are some useful points:

features.addFeatures(PAE);
features.addFeatures(APIC);
features.addFeatures(ACPI);
if (!"s390x".equals(System.getProperty("os.arch"))) {
Copy link
Member

Choose a reason for hiding this comment

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

may be better to create a method like

    private boolean isHostS390x() {
        return S390X.equals(System.getProperty("os.arch");
    }

Copy link
Contributor Author

Choose a reason for hiding this comment

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

reused existing isGuestS390x() method for this.

@DaanHoogland
Copy link
Contributor

great to see this integration effort @niyamsw , welcome to the crowd.

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.

agree with @weizhouapache 's rmark, but code looks good. Please realize that test facilities for this are not wide spread as much as some other platforms, so this is up to the author.

@codecov
Copy link

codecov bot commented Dec 4, 2024

Codecov Report

Attention: Patch coverage is 39.28571% with 17 lines in your changes missing coverage. Please review.

Project coverage is 16.06%. Comparing base (4ac4d9c) to head (e6e39c0).
Report is 461 commits behind head on main.

Files with missing lines Patch % Lines
...ervisor/kvm/resource/LibvirtComputingResource.java 41.17% 3 Missing and 7 partials ⚠️
...om/cloud/hypervisor/kvm/resource/LibvirtVMDef.java 25.00% 0 Missing and 3 partials ⚠️
...org/apache/cloudstack/utils/linux/KVMHostInfo.java 60.00% 1 Missing and 1 partial ⚠️
.../java/com/cloud/hypervisor/HypervisorGuruBase.java 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #10038      +/-   ##
============================================
- Coverage     16.06%   16.06%   -0.01%     
- Complexity    12860    12865       +5     
============================================
  Files          5640     5641       +1     
  Lines        493753   493808      +55     
  Branches      59854    59867      +13     
============================================
+ Hits          79323    79327       +4     
- Misses       405649   405692      +43     
- Partials       8781     8789       +8     
Flag Coverage Δ
uitests 4.02% <ø> (-0.01%) ⬇️
unittests 16.90% <39.28%> (-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.

@weizhouapache
Copy link
Member

@niyamsw
"s390x".equals(System.getProperty("os.arch") is used in several lines, we can replace them.

it checks if the host is s390x, is it same as isGuestS390x ?
in another word, should the host arch and guest arch be s390x ? for example, can x86_64 vms be deployed on a s390x host ?

@weizhouapache
Copy link
Member

@blueorangutan package

@blueorangutan
Copy link

@weizhouapache 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 11757

@niyam-choudhari
Copy link

@niyamsw "s390x".equals(System.getProperty("os.arch") is used in several lines, we can replace them.

it checks if the host is s390x, is it same as isGuestS390x ? in another word, should the host arch and guest arch be s390x ? for example, can x86_64 vms be deployed on a s390x host ?

This PR is only for introducing support for KVM on s390x host and s390x guests.
I have refactored the code as suggested and added isHostS390x() function to make the code more streamlined.

Copy link
Contributor

@JoaoJandre JoaoJandre left a comment

Choose a reason for hiding this comment

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

CLGTM

@DaanHoogland
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

@DaanHoogland 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-11892)
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 52550 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr10038-t11892-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_01_secure_vm_migration Error 405.43 test_vm_life_cycle.py

@niyamsw
Copy link
Contributor Author

niyamsw commented Jan 29, 2025

Just following up on this PR. Any feedback or next steps?

@DaanHoogland DaanHoogland merged commit 5df15a7 into apache:main Jan 29, 2025
26 checks passed
@boring-cyborg
Copy link

boring-cyborg bot commented Jan 29, 2025

Awesome work, congrats on your first merged pull request!

@rohityadavcloud rohityadavcloud added this to the 4.21.0 milestone Mar 4, 2025
shwstppr added a commit to shapeblue/cloudstack that referenced this pull request Mar 12, 2025
Based on changes from apache#10289

s390x support was added paritally with apache#10038

Signed-off-by: Abhishek Kumar <[email protected]>
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Jun 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

8 participants