You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by "andrijapanicsb (via GitHub)" <gi...@apache.org> on 2023/03/27 08:14:22 UTC

[GitHub] [cloudstack-documentation] andrijapanicsb commented on a diff in pull request #308: Add KVM Auto Enable-Disable Hosts docs

andrijapanicsb commented on code in PR #308:
URL: https://github.com/apache/cloudstack-documentation/pull/308#discussion_r1148945559


##########
source/adminguide/hosts.rst:
##########
@@ -1003,3 +1003,51 @@ The management server iterates through hosts in each cluster on the selected sco
   - In case the post-maintenance script fails and the ‘forced’ parameter is not set, then the rolling maintenance process fails and an error is reported. If the ‘forced’ parameter is set, the host is skipped and the iteration continues with the next host in the cluster
 
 - Enable the cluster that has been disabled, after all the hosts in the cluster have been processed, or in case an error has occurred.
+
+
+KVM Auto Enable/Disable Hosts
+-----------------------------
+
+The cluster configuration 'enable.kvm.host.auto.enable.disable' (disabled by default) allows CloudStack to auto-disable and auto-enable KVM hosts resource state based on customisable host/hypervisor health checks.
+
+KVM hosts health checks
+~~~~~~~~~~~~~~~~~~~~~~~
+
+For each KVM agent on the cluster, the property 'agent.health.check.script.path' must be added to the agent.properties file, indicating the path of an executable file/script for host health check.
+
+.. note:: The health script runs every 'ping.interval' seconds on a KVM host.
+
+.. note:: The health script will need execution permissions on a KVM host.
+
+Depending on the exit code of the health script, the KVM agent will report the management server with the following results:
+
+- The health check result is true, if the script is executed successfully and the exit code is 0
+- The health check result is false, if the script is executed successfully and the exit code is 1
+- The health check result is null, if
+
+   - Script file is not specified, or
+   - Script file does not exist, or
+   - Script file is not accessible by the user of the cloudstack-agent process, or
+   - Script file is not executable, or
+   - There are errors when the script is executed (exit codes other than 0 or 1)
+
+Management Server actions based on health checks
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The management server receives the health check results from the KVM agent, and takes the following actions:
+
+- If the host health check result is null, do nothing.
+- If the host health check result is true, enable the host resource state if it is Disabled.
+- If the host health check result is false, disable the host resource state if it is Enabled.
+
+On every automatic enable or disable event, the management server will send an alert to the admin and add/update an automatic annotation (comment) on the specific host.

Review Comment:
   add/update - or just Add the comment (as I understood)?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org