]> git.proxmox.com Git - pve-ha-manager.git/commit
move cfs update to common code
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 22 Nov 2017 10:53:11 +0000 (11:53 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 30 Jan 2018 08:33:16 +0000 (09:33 +0100)
commit3df15380942024f86f73112adbb1e521ebbfd88d
treefa60daec54663d12c038c837cce63305d647221d
parentda6f0416991c478a6bcdb9cc30b9c2ad4517a704
move cfs update to common code

We updated the CRM and LRM view of the cluster state only in the PVE2
environment, outside of all regression testing and simulation scope.

Further, we ignored if this update failed and happily worked with an
empty state, resulting in strange actions, e.g., the removal of all
(not so) "stale" services or changing the all but the masters node
state to unknown.

This patch tries to improve this by moving out the update in a own
environment method, cluster_update_state, calling this in the LRM and
CRM and saving its result.
As with our introduced functionallity to simulate cfs rw or update
errors we can also simulate failures of this state update with the RT
system.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
src/PVE/HA/CRM.pm
src/PVE/HA/Env.pm
src/PVE/HA/Env/PVE2.pm
src/PVE/HA/LRM.pm
src/PVE/HA/Sim/Env.pm
src/test/test-cfs-unavailable2/README [new file with mode: 0644]
src/test/test-cfs-unavailable2/cmdlist [new file with mode: 0644]
src/test/test-cfs-unavailable2/hardware_status [new file with mode: 0644]
src/test/test-cfs-unavailable2/manager_status [new file with mode: 0644]
src/test/test-cfs-unavailable2/service_config [new file with mode: 0644]