]> git.proxmox.com Git - pve-docs.git/blobdiff - ha-manager.adoc
remove gui-ha-manager-resources-view.png
[pve-docs.git] / ha-manager.adoc
index 904347d3999c44b480765562391f42de4ab1c4e7..04cff283c9de497487dcb91bc534ae37eaef81fd 100644 (file)
@@ -139,7 +139,7 @@ For now we have two important resources types - virtual machines and
 containers. One basic idea here is that we can bundle related software
 into such VM or container, so there is no need to compose one big
 service from other services, like it was done with `rgmanager`. In
-general, a HA enabled resource should not depend on other resources.
+general, a HA managed resource should not depend on other resources.
 
 
 How It Works
@@ -177,8 +177,6 @@ lock.
 Service States
 ~~~~~~~~~~~~~~
 
-[thumbnail="gui-ha-manager-status.png"]
-
 The CRM use a service state enumeration to record the current service
 state. We display this state on the GUI and you can query it using
 the `ha-manager` command line tool:
@@ -205,6 +203,10 @@ request_stop::
 Service should be stopped. The CRM waits for confirmation from the
 LRM.
 
+stopping::
+
+Pending stop request. But the CRM did not get the request so far.
+
 started::
 
 Service is active an LRM should start it ASAP if not already running.
@@ -212,6 +214,11 @@ If the Service fails and is detected to be not running the LRM
 restarts it
 (see xref:ha_manager_start_failure_policy[Start Failure Policy]).
 
+starting::
+
+Pending start request. But the CRM has not got any confirmation from the
+LRM that the service is running.
+
 fence::
 
 Wait for node fencing (service node is not inside quorate cluster
@@ -234,6 +241,14 @@ error::
 Service is disabled because of LRM errors. Needs manual intervention
 (see xref:ha_manager_error_recovery[Error Recovery]).
 
+queued::
+
+Service is newly added, and the CRM has not seen it so far.
+
+disabled::
+
+Service is stopped and marked as `disabled`
+
 
 Local Resource Manager
 ~~~~~~~~~~~~~~~~~~~~~~
@@ -322,9 +337,10 @@ lost agent lock::
 The CRM lost its lock, this means a failure happened and quorum was lost.
 
 It main task is to manage the services which are configured to be highly
-available and try to always enforce them to the wanted state, e.g.: a
-enabled service will be started if its not running, if it crashes it will
-be started again. Thus it dictates the LRM the actions it needs to execute.
+available and try to always enforce the requested state. For example, a
+service with the requested state 'started' will be started if its not
+already running. If it crashes it will be automatically started again.
+Thus the CRM dictates the actions which the LRM needs to execute.
 
 When an node leaves the cluster quorum, its state changes to unknown.
 If the current CRM then can secure the failed nodes lock, the services
@@ -349,10 +365,12 @@ automatically distributed to the cluster nodes, and all nodes share
 the same HA configuration.
 
 
+[[ha_manager_resource_config]]
 Resources
 ~~~~~~~~~
 
-[thumbnail="gui-ha-manager-resources-view.png"]
+[thumbnail="gui-ha-manager-status.png"]
+
 
 The resource configuration file `/etc/pve/ha/resources.cfg` stores
 the list of resources managed by `ha-manager`. A resource configuration
@@ -601,7 +619,7 @@ actual node. The default is set to one.
 
 NOTE: The relocate count state will only reset to zero when the
 service had at least one successful start. That means if a service is
-re-enabled without fixing the error only the restart policy gets
+re-started without fixing the error only the restart policy gets
 repeated.
 
 
@@ -611,17 +629,24 @@ Error Recovery
 
 If after all tries the service state could not be recovered it gets
 placed in an error state. In this state the service won't get touched
-by the HA stack anymore.  To recover from this state you should follow
-these steps:
+by the HA stack anymore. The only way out is disabling a service:
+
+----
+# ha-manager set vm:100 --state disabled
+----
 
-* bring the resource back into a safe and consistent state (e.g.,
-killing its process)
+This can also be done in the web interface.
 
-* disable the ha resource to place it in an stopped state
+To recover from the error state you should do the following:
+
+* bring the resource back into a safe and consistent state (e.g.:
+kill its process if the service could not be stopped)
+
+* disable the resource to remove the error flag
 
 * fix the error which led to this failures
 
-* *after* you fixed all errors you may enable the service again
+* *after* you fixed all errors you may request that the service starts again
 
 
 [[ha_manager_package_updates]]
@@ -703,13 +728,21 @@ Service Operations
 This are how the basic user-initiated service operations (via
 `ha-manager`) work.
 
-enable::
+set state::
 
-The service will be started by the LRM if not already running.
+Request the service state.
+See xref:ha_manager_resource_config[Resource Configuration] for possible
+request states.
++
+----
+# ha-manager set SID -state REQUEST_STATE
+----
 
 disable::
 
-The service will be stopped by the LRM if running.
+The service will be placed in the stopped state, even if it was in the error
+state. The service will not be recovered on a node failure and will stay
+stopped while it is in this state.
 
 migrate/relocate::