From 8536358840cfcf77ffb27184bb322c210eb21e0d Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Sun, 20 Nov 2016 09:27:40 +0100 Subject: [PATCH] ha-manager.adoc: improve configuration section --- gen-ha-resources-opts.pl | 18 ++++++++++++++++++ ha-manager.adoc | 38 +++++++++++++++++++++++++++++++------- 2 files changed, 49 insertions(+), 7 deletions(-) create mode 100755 gen-ha-resources-opts.pl diff --git a/gen-ha-resources-opts.pl b/gen-ha-resources-opts.pl new file mode 100755 index 0000000..cc1b7c0 --- /dev/null +++ b/gen-ha-resources-opts.pl @@ -0,0 +1,18 @@ +#!/usr/bin/perl + +use lib '.'; +use strict; +use warnings; +use PVE::RESTHandler; + +use Data::Dumper; + +use PVE::HA::Resources; + + +my $private = PVE::HA::Resources::private(); +my $properies = $private->{propertyList}; +delete $properies->{type}; +delete $properies->{sid}; + +print PVE::RESTHandler::dump_properties($properies); diff --git a/ha-manager.adoc b/ha-manager.adoc index 3a08d03..2da00cf 100644 --- a/ha-manager.adoc +++ b/ha-manager.adoc @@ -269,17 +269,41 @@ quorum, the LRM waits for a new quorum to form. As long as there is no quorum the node cannot reset the watchdog. This will trigger a reboot after the watchdog then times out, this happens after 60 seconds. + Configuration ------------- -The HA stack is well integrated in the Proxmox VE API2. So, for -example, HA can be configured via `ha-manager` or the PVE web -interface, which both provide an easy to use tool. +The HA stack is well integrated into the {pve} API. So, for example, +HA can be configured via the `ha-manager` command line interface, or +the {pve} web interface - both interfaces provide an easy way to +manage HA. Automation tools can use the API directly. + +All HA configuration files are within `/etc/pve/ha/`, so they get +automatically distributed to the cluster nodes, and all nodes share +the same HA configuration. + +The resource configuration file `/etc/pve/ha/resources.cfg` stores +the list of resources managed by `ha-manager`. A resource configuration +inside that list look like this: + +---- +: + + ... +---- + +It starts with the service ID followed by a collon. The next lines +contain additional properties: + +include::ha-resources-opts.adoc[] + + +The HA group configuration file `/etc/pve/ha/groups.cfg` is used to +define groups of cluster nodes. A resource can be restricted to run +only on the members of such group. + + -The resource configuration file can be located at -`/etc/pve/ha/resources.cfg` and the group configuration file at -`/etc/pve/ha/groups.cfg`. Use the provided tools to make changes, -there shouldn't be any need to edit them manually. Node Power Status ----------------- -- 2.39.2