[pve-devel] [PATCH ha-manager v3 0/6] various HA patches
Thomas Lamprecht
t.lamprecht at proxmox.com
Wed Sep 14 11:29:39 CEST 2016
Tried to address dietmars comments with v3.
* First and Second patch: new and trivial
* Third patch (new) fixes a wrong transition, error -> fence should not
been possible at all. Apart from the reason that we do not want to touch
service in the error state at all (which happens with such a transition)
this may result in a endless loop in combination with patch 4 (add check
if a service is relocatable and assert it on recovery)
* Fourth patch (lock simulation in virtual hardware) logs now the lock also
in the simulated test HW, further a lock now also prevents shutdown/migrate/
relocate of a service (to match real world behavior)
* Fifth patch (new) implements some primitive assertion if a service is
relocatable before trying to recover it. I plan to add those check also
in other places (e.g. when adding a service to HA) so I put it in a
method in PVE::HA::Tools which then calls the plugin specific method
We may want to extent it in the future, so that we check more things
(if storage/volumes are available for example) but for that some
restructuring in the LXC/QemuServer codes would help (we do there this checks
already, but not in its own method).
* Sixth patch removes the lock now not via the remove_lock method provided by
AbstractConfig as this method is well behaved and does not allows removing
locks from VMs/CTs located on another node. We also do not want to adapt
this method to allow arbitrary lock removing, independent on which node the
config is located, as this could cause missuse in the future. So as just the
HA manager needs such behavior in case of a fence and recover action we
(re)implement it just there. For more details see its commit message.
Thomas Lamprecht (6):
[1] add missing use clause in CT resource class
[2] add missing cleanup for fence config regression testsuite
[3] remove state transition from error to fence state
[4] add possibility to simulate locks from services
[5] add check if a service is relocatable and assert it on recovery
[6] cleanup backup & mounted locks after recovery (fixes #1100)
src/PVE/HA/Manager.pm | 34 ++++++++++++---
src/PVE/HA/Resources.pm | 13 ++++++
src/PVE/HA/Resources/PVECT.pm | 41 ++++++++++++++++++
src/PVE/HA/Resources/PVEVM.pm | 43 ++++++++++++++++++
src/PVE/HA/Sim/Hardware.pm | 48 +++++++++++++++++++++
src/PVE/HA/Sim/Resources.pm | 55 ++++++++++++++++++++++--
src/PVE/HA/Sim/TestHardware.pm | 9 ++++
src/PVE/HA/Tools.pm | 16 +++++++
src/test/Makefile | 2 +-
src/test/test-erroneous-service1/README | 2 +
src/test/test-erroneous-service1/cmdlist | 4 ++
src/test/test-erroneous-service1/hardware_status | 5 +++
src/test/test-erroneous-service1/log.expect | 18 ++++++++
src/test/test-erroneous-service1/manager_status | 15 +++++++
src/test/test-erroneous-service1/service_config | 3 ++
src/test/test-locked-service1/README | 3 ++
src/test/test-locked-service1/cmdlist | 5 +++
src/test/test-locked-service1/hardware_status | 5 +++
src/test/test-locked-service1/log.expect | 44 +++++++++++++++++++
src/test/test-locked-service1/manager_status | 1 +
src/test/test-locked-service1/service_config | 3 ++
src/test/test-locked-service2/README | 5 +++
src/test/test-locked-service2/cmdlist | 5 +++
src/test/test-locked-service2/hardware_status | 5 +++
src/test/test-locked-service2/log.expect | 39 +++++++++++++++++
src/test/test-locked-service2/manager_status | 1 +
src/test/test-locked-service2/service_config | 3 ++
27 files changed, 417 insertions(+), 10 deletions(-)
create mode 100644 src/test/test-erroneous-service1/README
create mode 100644 src/test/test-erroneous-service1/cmdlist
create mode 100644 src/test/test-erroneous-service1/hardware_status
create mode 100644 src/test/test-erroneous-service1/log.expect
create mode 100644 src/test/test-erroneous-service1/manager_status
create mode 100644 src/test/test-erroneous-service1/service_config
create mode 100644 src/test/test-locked-service1/README
create mode 100644 src/test/test-locked-service1/cmdlist
create mode 100644 src/test/test-locked-service1/hardware_status
create mode 100644 src/test/test-locked-service1/log.expect
create mode 100644 src/test/test-locked-service1/manager_status
create mode 100644 src/test/test-locked-service1/service_config
create mode 100644 src/test/test-locked-service2/README
create mode 100644 src/test/test-locked-service2/cmdlist
create mode 100644 src/test/test-locked-service2/hardware_status
create mode 100644 src/test/test-locked-service2/log.expect
create mode 100644 src/test/test-locked-service2/manager_status
create mode 100644 src/test/test-locked-service2/service_config
--
2.1.4
More information about the pve-devel
mailing list