Skip to content

KVM Host HA code improvements#13088

Open
sureshanaparti wants to merge 6 commits intoapache:4.22from
shapeblue:host-ha-code-improvements
Open

KVM Host HA code improvements#13088
sureshanaparti wants to merge 6 commits intoapache:4.22from
shapeblue:host-ha-code-improvements

Conversation

@sureshanaparti
Copy link
Copy Markdown
Contributor

@sureshanaparti sureshanaparti commented Apr 29, 2026

Description

This PR addresses the fix to not cancel VM HA items when Host HA is enabled & inspection in progress and improves the Host HA code (updates logs and some refactoring / cleanup).

When Host HA inspection in progress, the investigor returns the Host Status as Up which cancels the VM HA items, don't cancel the VM HA items instead reschedule them to try again later.

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?

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

@sureshanaparti
Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

❌ Patch coverage is 12.19512% with 252 lines in your changes missing coverage. Please review.
✅ Project coverage is 17.67%. Comparing base (ffebe8e) to head (66e9b45).
⚠️ Report is 8 commits behind head on 4.22.

Files with missing lines Patch % Lines
...ache/cloudstack/kvm/ha/KVMHostActivityChecker.java 0.00% 78 Missing ⚠️
...java/com/cloud/ha/HighAvailabilityManagerImpl.java 12.67% 60 Missing and 2 partials ⚠️
...vm/src/main/java/com/cloud/ha/KVMInvestigator.java 0.00% 16 Missing ⚠️
...oud/hypervisor/kvm/storage/LibvirtStoragePool.java 0.00% 16 Missing ⚠️
...n/java/org/apache/cloudstack/ha/HAManagerImpl.java 0.00% 14 Missing ⚠️
...java/org/apache/cloudstack/kvm/ha/KVMHAConfig.java 0.00% 10 Missing ⚠️
...om/cloud/hypervisor/kvm/resource/KVMHAMonitor.java 0.00% 9 Missing ⚠️
...oud/hypervisor/kvm/storage/LinstorStoragePool.java 0.00% 7 Missing ⚠️
...ud/hypervisor/kvm/storage/StorPoolStoragePool.java 0.00% 5 Missing ⚠️
...urce/wrapper/LibvirtCheckOnHostCommandWrapper.java 42.85% 3 Missing and 1 partial ⚠️
... and 18 more
Additional details and impacted files
@@             Coverage Diff              @@
##               4.22   #13088      +/-   ##
============================================
- Coverage     17.67%   17.67%   -0.01%     
+ Complexity    15789    15787       -2     
============================================
  Files          5922     5922              
  Lines        533094   533100       +6     
  Branches      65210    65202       -8     
============================================
- Hits          94246    94239       -7     
- Misses       428208   428219      +11     
- Partials      10640    10642       +2     
Flag Coverage Δ
uitests 3.69% <ø> (ø)
unittests 18.75% <12.19%> (-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.

@blueorangutan
Copy link
Copy Markdown

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

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

@sureshanaparti sureshanaparti changed the title Host HA code improvements KVM Host HA code improvements Apr 29, 2026
@sureshanaparti
Copy link
Copy Markdown
Contributor Author

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

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

Copy link
Copy Markdown
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.

lgtm and good cleanup (needs testing though)

@blueorangutan
Copy link
Copy Markdown

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

Test Result Time (s) Test File

… progress, and some code improvements

- When Host HA inspection in progress, the investigor returns the Host Status as Up which cancels the VM HA items
- Don't cancel the VM HA items, instead reschedule them to try again later
@sureshanaparti
Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

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

@sureshanaparti sureshanaparti marked this pull request as ready for review May 6, 2026 08:31
@blueorangutan
Copy link
Copy Markdown

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

…agent connection status to determine the Host HA inspection in progress or not, and some code improvements
@sureshanaparti
Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

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

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

@sureshanaparti
Copy link
Copy Markdown
Contributor Author

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

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

@blueorangutan
Copy link
Copy Markdown

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

Test Result Time (s) Test File

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.

3 participants