[pve-devel] [RFC ha-manager v2 0/7] implement HW fencing for the ha-manager
Thomas Lamprecht
t.lamprecht at proxmox.com
Fri Mar 11 16:57:09 CET 2016
This is the second big revision from the HW fencing patch series.
The Fence and FenceConfig class share a lot code from the previous iteration.
Everything else is new or almost completely rewritten.
Changes:
* regression test for Configs
* new Hardware Class which executes the fence command respective
environment.
* regression test for fencing itself (one only but still :D)
* we always want the fenced node agent lock (that is our base
condition which *must* hold if we want to recover a service
from said node). If we HW fenced a node we steal its lock after
that and only then begin to recover its services.
This iteration has still some flaws, which where left out for later
as I wanted to get an opinion over the big picture and didn't want to invest
time in things which may get overhauled completely.
Those known flaws include:
* the config parser could be a bit better, mainly regarding escaped strings
(\" at the end of a param for example).
* write_config is untested, but also not used yet, we do that later when
we use it for integrating the HW fence stack in the API
* The Fence class is half "state full", we should probably add a constructor
and convert it to a normal state full class which gets initialized
by 'NodeStatus'.
Things ToDo:
* more regression tests
* add possibillity to overwrite set action of fence devices and thus show
their current status and that the connection works.
* integrate in API
The first patch could probably be split into two, one for the FenceConfig
class itself and one for regression tests.
RFC.
cheers,
Thomas
Thomas Lamprecht (7):
add FenceConfig class for external fencing devices
Env: add 'read_fence_config' and 'fencing_mode'
add Hardware Base class
add Fence class for external fence devices
allow LRM lock stealing for fenced nodes
allow use of external fencing devices
WIP! Adapt docs and README
README | 111 +++++++++++
src/PVE/HA/Config.pm | 12 +-
src/PVE/HA/Env.pm | 16 +-
src/PVE/HA/Env/PVE2.pm | 34 +++-
src/PVE/HA/Fence.pm | 217 +++++++++++++++++++++
src/PVE/HA/FenceConfig.pm | 191 ++++++++++++++++++
src/PVE/HA/Hardware.pm | 31 +++
src/PVE/HA/Makefile | 3 +-
src/PVE/HA/Manager.pm | 12 +-
src/PVE/HA/NodeStatus.pm | 28 ++-
src/PVE/HA/Sim/Env.pm | 32 ++-
src/PVE/HA/Sim/Hardware.pm | 21 +-
src/PVE/HA/Sim/TestHardware.pm | 18 +-
src/PVE/Service/pve_ha_crm.pm | 4 +-
src/test/Makefile | 10 +-
src/test/fence_cfgs/complex-params-1.cfg | 5 +
src/test/fence_cfgs/complex-params-1.cfg.expect | 8 +
src/test/fence_cfgs/connect-before-device-1.cfg | 9 +
.../fence_cfgs/connect-before-device-1.cfg.expect | 1 +
src/test/fence_cfgs/double-device-1.cfg | 8 +
src/test/fence_cfgs/double-device-1.cfg.expect | 1 +
src/test/fence_cfgs/parallel-1.cfg | 29 +++
src/test/fence_cfgs/parallel-1.cfg.expect | 21 ++
src/test/fence_cfgs/simple-1.cfg | 4 +
src/test/fence_cfgs/simple-1.cfg.expect | 8 +
src/test/fence_cfgs/simple-2.cfg | 15 ++
src/test/fence_cfgs/simple-2.cfg.expect | 16 ++
src/test/test-hw-fence1/README | 1 +
src/test/test-hw-fence1/cmdlist | 4 +
src/test/test-hw-fence1/fence.cfg | 6 +
src/test/test-hw-fence1/hardware_status | 5 +
src/test/test-hw-fence1/log.expect | 51 +++++
src/test/test-hw-fence1/manager_status | 1 +
src/test/test-hw-fence1/service_config | 5 +
src/test/test_fence_config.pl | 126 ++++++++++++
35 files changed, 1037 insertions(+), 27 deletions(-)
create mode 100644 src/PVE/HA/Fence.pm
create mode 100644 src/PVE/HA/FenceConfig.pm
create mode 100644 src/PVE/HA/Hardware.pm
create mode 100644 src/test/fence_cfgs/complex-params-1.cfg
create mode 100644 src/test/fence_cfgs/complex-params-1.cfg.expect
create mode 100644 src/test/fence_cfgs/connect-before-device-1.cfg
create mode 100644 src/test/fence_cfgs/connect-before-device-1.cfg.expect
create mode 100644 src/test/fence_cfgs/double-device-1.cfg
create mode 100644 src/test/fence_cfgs/double-device-1.cfg.expect
create mode 100644 src/test/fence_cfgs/parallel-1.cfg
create mode 100644 src/test/fence_cfgs/parallel-1.cfg.expect
create mode 100644 src/test/fence_cfgs/simple-1.cfg
create mode 100644 src/test/fence_cfgs/simple-1.cfg.expect
create mode 100644 src/test/fence_cfgs/simple-2.cfg
create mode 100644 src/test/fence_cfgs/simple-2.cfg.expect
create mode 100644 src/test/test-hw-fence1/README
create mode 100644 src/test/test-hw-fence1/cmdlist
create mode 100644 src/test/test-hw-fence1/fence.cfg
create mode 100644 src/test/test-hw-fence1/hardware_status
create mode 100644 src/test/test-hw-fence1/log.expect
create mode 100644 src/test/test-hw-fence1/manager_status
create mode 100644 src/test/test-hw-fence1/service_config
create mode 100755 src/test/test_fence_config.pl
--
2.1.4
More information about the pve-devel
mailing list