]> git.proxmox.com Git - pve-ha-manager.git/commit
fix #1378: allow to specify a service shutdown policy
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 20 Dec 2018 07:44:42 +0000 (08:44 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 7 Jan 2019 10:17:30 +0000 (11:17 +0100)
commitba15a9b9087694f73a89b8fdacac7f5c8cf2b68e
treedfb85938781b5c2e1c8eb601e26bbfbed70e18fa
parented408b449128239641048f315cd5849ab90da8bd
fix #1378: allow to specify a service shutdown policy

Allow an admin to set a datacenter wide HA policy which can change
the way we handle services on a node shutdown.

There's:

* freeze: always freeze servivces, independent of the shutdown type
  (reboot, poweroff)
* failover: never freeze services, this means that a service will get
  recovered to another node if possible and if the current node does
  not comes back up in the grace period of 1 minute.
* default: this is the current behavior, freeze on reboot but do not
  freeze on poweroff

Add to tests, shutdown-policy1 which is based of the reboot1 test,
but enforces no freeze with a failover policy, and shutdown-policy2
which is based on the shutdown1 test but with a explicit freeze
policy. You can compare (diff) each tests log result to the test it's
based on to see what changes.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
13 files changed:
src/PVE/HA/LRM.pm
src/test/test-shutdown-policy1/cmdlist [new file with mode: 0644]
src/test/test-shutdown-policy1/datacenter.cfg [new file with mode: 0644]
src/test/test-shutdown-policy1/hardware_status [new file with mode: 0644]
src/test/test-shutdown-policy1/log.expect [new file with mode: 0644]
src/test/test-shutdown-policy1/manager_status [new file with mode: 0644]
src/test/test-shutdown-policy1/service_config [new file with mode: 0644]
src/test/test-shutdown-policy2/cmdlist [new file with mode: 0644]
src/test/test-shutdown-policy2/datacenter.cfg [new file with mode: 0644]
src/test/test-shutdown-policy2/hardware_status [new file with mode: 0644]
src/test/test-shutdown-policy2/log.expect [new file with mode: 0644]
src/test/test-shutdown-policy2/manager_status [new file with mode: 0644]
src/test/test-shutdown-policy2/service_config [new file with mode: 0644]