]> git.proxmox.com Git - pve-ha-manager.git/commit - src/PVE/HA/Env/PVE2.pm
always queue service stop if node shuts down
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 26 May 2017 15:56:11 +0000 (17:56 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Tue, 30 May 2017 08:45:37 +0000 (10:45 +0200)
commitf65f41b9d8fcdb1517f2089c9f1b5abb4fbaedc7
treeae6adb831040a999700d7fd41141b7bacca05803
parent2f549281f26a2a183d9d18ca0c91e286c0c0a3da
always queue service stop if node shuts down

Commit 61ae38eb6fc5ab351fb61f2323776819e20538b7 which ensured that
services get freezed on a node reboot had a side effect where running
services did not get gracefully shutdown on node reboot.
This may lead to data loss as the services then get hard killed, or
they may even prevent a node reboot because a storage cannot get
unmounted as a service still access it.

This commits addresses this issue but does not changes behavior of
the freeze logic for now, but we should evaluate if a freeze makes
really sense here or at least make it configurable.

The changed regression test is a result of the fact that we did not
adapt the correct behavior for the is_node_shutdown command in the
problematic commit. The simulation envrionment returned true
everytime a node shutdown (reboot and poweroff) and the real world
environment just returned true if a poweroff happened but not on a
reboot.

Now the simulation acts the same way as the real environment.
Further I moved the simulation implemenentation to the base class so
that both simulator and regression test system behave the same.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/HA/Env/PVE2.pm
src/PVE/HA/LRM.pm
src/PVE/HA/Sim/Env.pm
src/PVE/HA/Sim/TestEnv.pm
src/test/test-reboot1/log.expect