FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

KVM: Enable HA heartbeat on ShareMountPoint by weizhouapache · Pull Request #12773 · apache/cloudstack · GitHub

Repository navigation

KVM: Enable HA heartbeat on ShareMountPoint - #12773

Merged
sureshanaparti merged 17 commits into
apache:4.22from
weizhouapache:4.22-kvm-ha-on-shared-mount-point
Apr 10, 2026
Merged

sureshanaparti merged 17 commits into
apache:4.22from
weizhouapache:4.22-kvm-ha-on-shared-mount-point

Conversation

Copy link
Copy Markdown
Member

Description

This PR improves KVM HA heartbeat to support SharedMountPoint

Tested

  • add shared mount point pool
  • kvm hosts write heartbeat to the mount point
  • deploy vms
  • set global settingforce.ha to true
  • force shutdown one of the kvm hosts
  • after 3 mins, the VMs are started on other kvm hosts.

Example of heartbeat files

[root@kvm1 ~]# ls -l /mnt/cloudstack*/KVMHA
/mnt/cloudstack1/KVMHA:
total 1
-rw-r--r--. 1 root root 11 Mar  9 12:28 hb-10.1.34.125
-rw-r--r--. 1 root root 11 Mar  9 12:09 hb-10.1.35.76

/mnt/cloudstack2/KVMHA:
total 1
-rw-r--r--. 1 root root 11 Mar  9 12:28 hb-10.1.34.125
-rw-r--r--. 1 root root 11 Mar  9 12:09 hb-10.1.35.76

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?

weizhouapache force-pushed the 4.22-kvm-ha-on-shared-mount-point branch from 296835a to 93b95aa Compare March 9, 2026 12:47

codecov Bot commented Mar 9, 2026 •
edited
Loading

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 3.84615% with 25 lines in your changes missing coverage. Please review.
✅ Project coverage is 17.60%. Comparing base (c1af36f) to head (9cebe72).
⚠️ Report is 22 commits behind head on 4.22.

Files with missing lines Patch % Lines
...oud/hypervisor/kvm/storage/LibvirtStoragePool.java 0.00% 15 Missing ⚠️
...om/cloud/hypervisor/kvm/resource/KVMHAMonitor.java 0.00% 4 Missing ⚠️
.../hypervisor/kvm/storage/KVMStoragePoolManager.java 0.00% 3 Missing ⚠️
...ervisor/kvm/resource/LibvirtComputingResource.java 0.00% 1 Missing ⚠️
...irtCheckVMActivityOnStoragePoolCommandWrapper.java 0.00% 1 Missing ⚠️
...e/driver/CloudStackPrimaryDataStoreDriverImpl.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               4.22   #12773      +/-   ##
============================================
- Coverage     17.61%   17.60%   -0.01%     
+ Complexity    15676    15674       -2     
============================================
  Files          5917     5917              
  Lines        531537   531546       +9     
  Branches      64985    64988       +3     
============================================
- Hits          93610    93598      -12     
- Misses       427369   427391      +22     
+ Partials      10558    10557       -1     
Flag Coverage Δ
uitests 3.70% <ø> (ø)
unittests 18.68% <3.84%> (-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.

Copy link
Copy Markdown
Member Author

@blueoranguran package

weizhouapache requested a review from Copilot March 9, 2026 16:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Pull request overview

Enhances KVM HA heartbeat to support SharedMountPoint primary storage by introducing a new heartbeat script and extending HA support checks across KVM storage and monitor components.

Changes:

  • Added a new KVM “SharedMountPoint” heartbeat script (kvmsmpheartbeat.sh) that writes heartbeat files to a mountpoint.
  • Expanded HA-supported storage pool types to include SharedMountPoint in driver, monitor, and pool logic.
  • Added a setType hook to KVMStoragePool and set the pool type after creation / retrieval to ensure HA detection works.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
scripts/vm/hypervisor/kvm/kvmsmpheartbeat.sh New local mountpoint-based heartbeat writer/checker script for SharedMountPoint HA.
plugins/storage/volume/default/.../CloudStackPrimaryDataStoreDriverImpl.java Allows HA support for SharedMountPoint in primary storage capability logic.
plugins/hypervisors/kvm/.../LibvirtStoragePool.java Enables HA support for SharedMountPoint and selects the correct heartbeat script.
plugins/hypervisors/kvm/.../KVMStoragePoolManager.java Sets pool type after creation; exposes getStorageAdaptor.
plugins/hypervisors/kvm/.../KVMStoragePool.java Introduces a default setType method for backward compatibility.
plugins/hypervisors/kvm/.../LibvirtCheckVMActivityOnStoragePoolCommandWrapper.java Ensures retrieved pool has its type set before HA checks.
plugins/hypervisors/kvm/.../KVMHAMonitor.java Expands heartbeat monitoring to include SharedMountPoint pools.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

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

Copy link
Copy Markdown
Member Author

@blueorangutan package

Copy link
Copy Markdown

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

Copy link
Copy Markdown

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

Copy link
Copy Markdown
Member Author

@blueorangutan test

Copy link
Copy Markdown

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

weizhouapache added this to the 4.22.1 milestone Mar 10, 2026

Copy link
Copy Markdown
Member Author

@sureshanaparti @rajujith
added this to 4.22.1 milestone, a small improvement but may benefit several users

cc @DaanHoogland @NuxRo

Copy link
Copy Markdown

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

Test Result Time (s) Test File
ContextSuite context=TestListIdsParams>:teardown Error 1.12 test_list_ids_parameter.py
test_01_snapshot_root_disk Error 7.74 test_snapshots.py
test_02_list_snapshots_with_removed_data_store Error 47.53 test_snapshots.py
test_02_list_snapshots_with_removed_data_store Error 47.54 test_snapshots.py
ContextSuite context=TestSnapshotStandaloneBackup>:teardown Error 31.34 test_snapshots.py
test_01_snapshot_usage Error 25.61 test_usage.py
test_01_vpn_usage Error 1.08 test_usage.py

weizhouapache and others added 3 commits March 10, 2026 17:01
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
rajujith moved this to In Progress in Apache CloudStack 4.22.1 Mar 11, 2026

DaanHoogland left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

clgtm

Copy link
Copy Markdown
Member Author

thanks @DaanHoogland @sureshanaparti , and Copilot for review

@NuxRo
I think this is ready for testing now

Copy link
Copy Markdown

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

Copy link
Copy Markdown
Member Author

@blueorangutan test

Copy link
Copy Markdown

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

Copy link
Copy Markdown

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

Test Result Time (s) Test File
ContextSuite context=TestListIdsParams>:teardown Error 1.14 test_list_ids_parameter.py
test_01_snapshot_root_disk Error 4.78 test_snapshots.py
test_02_list_snapshots_with_removed_data_store Error 47.49 test_snapshots.py
test_02_list_snapshots_with_removed_data_store Error 47.50 test_snapshots.py
ContextSuite context=TestSnapshotStandaloneBackup>:teardown Error 30.40 test_snapshots.py
test_01_snapshot_usage Error 34.85 test_usage.py
test_01_vpn_usage Error 1.08 test_usage.py

Copy link
Copy Markdown
Member Author

@blueorangutan package

Copy link
Copy Markdown

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

Copy link
Copy Markdown

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

Copy link
Copy Markdown
Member Author

@blueorangutan test

Copy link
Copy Markdown

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

Copy link
Copy Markdown

[SF] Trillian test result (tid-15749)
Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 57842 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr12773-t15749-kvm-ol8.zip
Smoke tests completed. 148 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_deployVMInSharedNetwork Failure 331.05 test_network.py

rajujith left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM
Tested

sureshanaparti merged commit e297644 into apache:4.22 Apr 10, 2026
25 of 26 checks passed
github-project-automation Bot moved this from In Progress to Done in Apache CloudStack 4.22.1 Apr 10, 2026
DaanHoogland deleted the 4.22-kvm-ha-on-shared-mount-point branch April 10, 2026 08:46
dhslove pushed a commit to dhslove/ablestack-cloud that referenced this pull request Apr 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

KV Host HA/instance HA with shared mountpoint

6 participants


Back | FazBrowse Home | New Git URL