[pve-devel] [RFC pve-ha-manager 0/8] Do not freeze services on (gracefull) shutdown

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Dec 11 20:01:37 CET 2015


This patch series changes the behaviour of the ha-manager in regards to freezing.
Now Services won't get freezed when there is a poweroff.target job running when stopping the pve-ha-lrm.
That means it won't freeze services on a graceful shutdown, so the will be fenced if the node takes to long to come back online again.
On reboot, restart of the service and stop of the service (witouth a poweroff) the behaviour stays the same as until now, the service will be freezed.

This series is quite long it, fortunately, also adds regression testing for this cases.
"Only" patch 6 and 7 implement the needed changes, the rest are changes on the Testframe work.

Note that the simulator does not the newly added 'shutdown' and 'restart' functions, but as there is nno option on the GUI to trigger them that shouldn't be a show-stopper at the moment.

Thomas Lamprecht (8):
  Hardware: remove unnecessary lock in get_node_info
  Hardware: change online computation of node slightly
  TestHardware: add helper commands functions
  TestHardware: implement 'restart' & 'shutdown' action
  TestHardware: add a more determinative delay possibility
  HA Env: add 'is_poweroff' function
  do not freeze services on a graceful poweroff
  add tests for shutdown and restart behaviour

 src/PVE/HA/Env.pm                                  |  7 ++
 src/PVE/HA/Env/PVE2.pm                             | 18 +++++
 src/PVE/HA/LRM.pm                                  | 16 +++-
 src/PVE/HA/Manager.pm                              |  3 +-
 src/PVE/HA/Sim/Env.pm                              |  5 ++
 src/PVE/HA/Sim/Hardware.pm                         | 12 +--
 src/PVE/HA/Sim/TestEnv.pm                          | 15 ++++
 src/PVE/HA/Sim/TestHardware.pm                     | 91 ++++++++++++++++++++--
 src/test/test-restart1/README                      |  2 +
 src/test/test-restart1/cmdlist                     |  4 +
 src/test/test-restart1/hardware_status             |  5 ++
 src/test/test-restart1/log.expect                  | 48 ++++++++++++
 src/test/test-restart1/manager_status              |  1 +
 src/test/test-restart1/service_config              |  5 ++
 src/test/test-shutdown1/README                     |  2 +
 src/test/test-shutdown1/cmdlist                    |  5 ++
 src/test/test-shutdown1/hardware_status            |  5 ++
 src/test/test-shutdown1/log.expect                 | 50 ++++++++++++
 src/test/test-shutdown1/manager_status             |  1 +
 src/test/test-shutdown1/service_config             |  5 ++
 src/test/test-shutdown2/README                     |  2 +
 src/test/test-shutdown2/cmdlist                    |  5 ++
 src/test/test-shutdown2/hardware_status            |  5 ++
 src/test/test-shutdown2/log.expect                 | 47 +++++++++++
 src/test/test-shutdown2/manager_status             |  1 +
 src/test/test-shutdown2/service_config             |  5 ++
 src/test/test-shutdown2/status/cluster_locks       |  1 +
 src/test/test-shutdown2/status/crm_commands        |  0
 src/test/test-shutdown2/status/groups              | 11 +++
 src/test/test-shutdown2/status/hardware.lck        |  0
 src/test/test-shutdown2/status/hardware_status     |  1 +
 src/test/test-shutdown2/status/log                 | 47 +++++++++++
 src/test/test-shutdown2/status/lrm_status_node1    |  1 +
 src/test/test-shutdown2/status/lrm_status_node2    |  1 +
 src/test/test-shutdown2/status/lrm_status_node3    |  1 +
 src/test/test-shutdown2/status/manager_status      |  1 +
 src/test/test-shutdown2/status/service_config      |  5 ++
 .../test-shutdown2/status/service_status_node1     |  1 +
 .../test-shutdown2/status/service_status_node2     |  1 +
 .../test-shutdown2/status/service_status_node3     |  1 +
 src/test/test-shutdown2/status/watchdog_status     |  1 +
 41 files changed, 419 insertions(+), 19 deletions(-)
 create mode 100644 src/test/test-restart1/README
 create mode 100644 src/test/test-restart1/cmdlist
 create mode 100644 src/test/test-restart1/hardware_status
 create mode 100644 src/test/test-restart1/log.expect
 create mode 100644 src/test/test-restart1/manager_status
 create mode 100644 src/test/test-restart1/service_config
 create mode 100644 src/test/test-shutdown1/README
 create mode 100644 src/test/test-shutdown1/cmdlist
 create mode 100644 src/test/test-shutdown1/hardware_status
 create mode 100644 src/test/test-shutdown1/log.expect
 create mode 100644 src/test/test-shutdown1/manager_status
 create mode 100644 src/test/test-shutdown1/service_config
 create mode 100644 src/test/test-shutdown2/README
 create mode 100644 src/test/test-shutdown2/cmdlist
 create mode 100644 src/test/test-shutdown2/hardware_status
 create mode 100644 src/test/test-shutdown2/log.expect
 create mode 100644 src/test/test-shutdown2/manager_status
 create mode 100644 src/test/test-shutdown2/service_config
 create mode 100644 src/test/test-shutdown2/status/cluster_locks
 create mode 100644 src/test/test-shutdown2/status/crm_commands
 create mode 100644 src/test/test-shutdown2/status/groups
 create mode 100644 src/test/test-shutdown2/status/hardware.lck
 create mode 100644 src/test/test-shutdown2/status/hardware_status
 create mode 100644 src/test/test-shutdown2/status/log
 create mode 100644 src/test/test-shutdown2/status/lrm_status_node1
 create mode 100644 src/test/test-shutdown2/status/lrm_status_node2
 create mode 100644 src/test/test-shutdown2/status/lrm_status_node3
 create mode 100644 src/test/test-shutdown2/status/manager_status
 create mode 100644 src/test/test-shutdown2/status/service_config
 create mode 100644 src/test/test-shutdown2/status/service_status_node1
 create mode 100644 src/test/test-shutdown2/status/service_status_node2
 create mode 100644 src/test/test-shutdown2/status/service_status_node3
 create mode 100644 src/test/test-shutdown2/status/watchdog_status

-- 
2.1.4





More information about the pve-devel mailing list