GitHub user sbrueseke edited a discussion: Host-HA vs VM-HA (was: KVMHAMonitor 
getting initialized without host ha enabled)

<!--
Verify first that your issue/request is not already reported on GitHub.
Also test if the latest release and main branch are affected too.
Always add information AFTER of these HTML comments, but no need to delete the 
comments.
-->

##### ISSUE TYPE
<!-- Pick one below and delete the rest -->
 * Bug Report

##### COMPONENT NAME
<!--
Categorize the issue, e.g. API, VR, VPN, UI, etc.
-->
~~~
HA
~~~

##### CLOUDSTACK VERSION
<!--
New line separated list of affected versions, commit ID for issues on main 
branch.
-->

~~~
4.19.0
~~~

##### CONFIGURATION
<!--
Information about the configuration if relevant, e.g. basic network, advanced 
networking, etc.  N/A otherwise
-->


##### OS / ENVIRONMENT
<!--
Information about the environment if relevant, N/A otherwise
-->


##### SUMMARY
<!-- Explain the problem/feature briefly -->
Even when HA has been disabled on cluster and/or host level, KVMHAMonitor 
getting initialized on KVM hosts.
It looks like code does not check if HA is enabled or not:
https://github.com/apache/cloudstack/blob/8f6721ed4c4e1b31081a951c62ffbe5331cf16d4/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java

##### STEPS TO REPRODUCE
<!--
For bugs, show exactly how to reproduce the problem, using a minimal test-case. 
Use Screenshots if accurate.

For new features, show how the feature would be used.
-->

<!-- Paste example playbooks or commands between quotes below -->
~~~
1) disable HA on cluster level via UI
2) login to kvm host
3) take a look at agent.log
~~~

<!-- You can also paste gist.github.com links for larger files -->

##### EXPECTED RESULTS
<!-- What did you expect to happen when running the steps above? -->

When HA is disabled I would expect that the management server adds the 
following parameter to agent.properties file of each host:
reboot.host.and.alert.management.on.heartbeat.timeout=false

or

KVMHAMonitor will not getting initialized at all.

##### ACTUAL RESULTS
<!-- What actually happened? -->

<!-- Paste verbatim command output between quotes below -->
Nothing happens when disabling HA on cluster and/or host level. KVMHAMonitor is 
getting initialized and will perform checks of the host. In some situations 
this will lead to an automatic reboot of the host because of KVMHAMonitor is 
not able to write heartbeat for pool to primary storage:
~~~
Feb 19 12:01:08 kvm-2 java[9465]: WARN  [kvm.resource.KVMHAMonitor] (Thread-1:) 
(logid:) Write heartbeat for pool [71c272d3-b180-4b18-a0fc-cfc1dc5b86c9] 
failed: Down; try: 5 of 5.
Feb 19 12:01:08 kvm-2 java[9465]: WARN  [kvm.resource.KVMHAMonitor] (Thread-1:) 
(logid:) Write heartbeat for pool [71c272d3-b180-4b18-a0fc-cfc1dc5b86c9] 
failed: Down; stopping cloudstack-agent.
Feb 19 12:02:08 kvm-2 heartbeat: kvmspheartbeat.sh will reboot system because 
it was unable to write the heartbeat to the storage.

~~~


GitHub link: https://github.com/apache/cloudstack/discussions/8953

----
This is an automatically sent email for users@cloudstack.apache.org.
To unsubscribe, please send an email to: users-unsubscr...@cloudstack.apache.org

Reply via email to