KVM HA: Fix CheckOnHostAnswer success flag when there is no heartbeat#13373
Conversation
|
@blueorangutan package |
|
@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.22 #13373 +/- ##
============================================
- Coverage 17.67% 17.67% -0.01%
+ Complexity 15792 15791 -1
============================================
Files 5922 5922
Lines 533165 533166 +1
Branches 65208 65208
============================================
Hits 94242 94242
- Misses 428276 428277 +1
Partials 10647 10647
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@blueorangutan package |
|
@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
|
@blueorangutan package |
|
@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. |
|
Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 18187 |
|
@sureshanaparti |
|
@blueorangutan package |
|
@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. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 18189 |
|
@sureshanaparti these two lines are the same actually |
@weizhouapache answer's success flag is set in the second case (result should be true which indicates the cmd is successfully processed without any errors, and then get the other details - isAlive, etc), and answer.getResult() is true here: |
ok, I will re-test |
|
@kiranchavala |
|
need another approval on dev review or qa |
| @Override | ||
| public Answer execute(final CheckOnHostCommand command, final CitrixResourceBase citrixResourceBase) { | ||
| return new CheckOnHostAnswer(command, "Not Implmeneted"); | ||
| return new CheckOnHostAnswer(command, "Not Implemented"); |
There was a problem hiding this comment.
is the <null> needed as second parameter here as well?
[4.22.1.0-shapeblue1] Upstream PRs apache#13373 and apache#12651
There was a problem hiding this comment.
LGTM, VM ha kicks in after the host is determined as Down
covered both scenarios
-
VM HA + Host ha Disabled
-
VM HA + Host ha Enabled
Before fix
2026-07-06 11:09:02,217 INFO [c.c.a.m.ClusteredAgentManagerImpl] (AgentTaskPool-1:[ctx-95f49608]) (logid:e286330d) The agent from host Host {"id":1,"name":"ref-trl-11971-k-Mol8-kiran-chavala-kvm1","type":"Routing","uuid":"f381eed2-bc93-43a1-9a8a-d439d804b40a"} state determined is Disconnected
After fix
2026-07-06 11:31:19,802 INFO [c.c.a.m.ClusteredAgentManagerImpl] (AgentTaskPool-4:[ctx-e65f658b]) (logid:2e73eea3) The agent from host Host {"id":1,"name":"ref-trl-11971-k-Mol8-kiran-chavala-kvm1","type":"Routing","uuid":"f381eed2-bc93-43a1-9a8a-d439d804b40a"} state determined is Down
2026-07-06 11:31:19,840 WARN [c.c.a.AlertManagerImpl] (AgentTaskPool-4:[ctx-e65f658b]) (logid:2e73eea3) No recipients set in global setting 'alert.email.addresses', skipping sending alert with subject [Host is down, name: ref-trl-11971-k-Mol8-kiran-chavala-kvm1 (id:1), availability zone: ref-trl-11971-k-Mol8-kiran-chavala, pod: Pod1] and content [Host [name: ref-trl-11971-k-Mol8-kiran-chavala-kvm1 (id:1), availability zone: ref-trl-11971-k-Mol8-kiran-chavala, pod: Pod1] is down. Starting HA on the following VMs: test-vmha].
2026-07-06 11:31:19,841 DEBUG [c.c.h.HighAvailabilityManagerExtImpl] (AgentTaskPool-4:[ctx-e65f658b]) (logid:2e73eea3) Notifying HA Mgr of to restart Instance VM instance {"id":44,"instanceName":"i-2-44-VM","state":"Running","type":"User","uuid":"d808e241-5ade-4465-bd3d-75c700fee5a4"}
2026-07-06 11:31:19,843 DEBUG [c.c.h.HighAvailabilityManagerExtImpl] (AgentTaskPool-4:[ctx-e65f658b]) (logid:2e73eea3) HA schedule restart
2026-07-06 11:31:19,847 INFO [c.c.h.HighAvailabilityManagerExtImpl] (AgentTaskPool-4:[ctx-e65f658b]) (logid:2e73eea3) Schedule vm for HA: VM instance {"id":44,"instanceName":"i-2-44-VM","state":"Running","type":"User","uuid":"d808e241-5ade-4465-bd3d-75c700fee5a4"}
|
thanks @kiranchavala merging |
Description
This PR fixes the CheckOnHostAnswer success flag when there is no heartbeat, for KVM HA.
Fixes #13371
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?