Skip to content

kvm: fix HA checker deciding host state from the last pool only - #14410

Open
Pearl1594 wants to merge 1 commit into
4.20from
fix-kvm-ha-checker-multi-pool
Open

Pearl1594 wants to merge 1 commit into
4.20from
fix-kvm-ha-checker-multi-pool

Conversation

@Pearl1594

Copy link
Copy Markdown
Contributor

Description

KVMHAChecker decides whether a host's storage heartbeat is alive across all of its HA-enabled primary storage pools. With kvm.ha.fence.on.storage.heartbeat.failure=false (the default), the loop overwrote its result on every iteration, so only the last pool in the list decided the outcome:

  • last pool dead, others healthy: host reported dead, which can lead to unnecessary fencing and HA restarts
  • an earlier pool dead, last pool healthy: the failure was ignored

With a single pool, or with the setting true, behaviour is unchanged. The change only affects hosts with multiple HA pools and the setting at false. Now, with setting as false, KVMHAChecker reports the host as dead only when every pool has no heartbeat.

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

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?

@codecov

codecov Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 16.41%. Comparing base (376c1b4) to head (529a778).

Additional details and impacted files
@@            Coverage Diff            @@
##               4.20   #14410   +/-   ##
=========================================
  Coverage     16.41%   16.41%           
- Complexity    13657    13663    +6     
=========================================
  Files          5669     5669           
  Lines        501628   501633    +5     
  Branches      60942    60943    +1     
=========================================
+ Hits          82336    82366   +30     
+ Misses       410064   410041   -23     
+ Partials       9228     9226    -2     
Flag Coverage Δ
uitests 4.16% <ø> (ø)
unittests 17.28% <100.00%> (+<0.01%) ⬆️

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

☔ View full report in Codecov by Harness.
📢 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.

@sonarqubecloud

Copy link
Copy Markdown

This branch has not been deployed

No deployments
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.

1 participant