[pve-devel] [PATCH v2 ha-manager 00/12] Implement a stop command for HA

Fabian Ebner f.ebner at proxmox.com
Mon Sep 30 09:22:25 CEST 2019


This patch series introduces a new 'stop' command for ha-manager.
The command takes a timeout parameter and in case it is 0, it performs a hard stop.
The series also includes a test for the new command.
A few changes to how parameters were handled in CRM/LRM were necessary
as well as allowing the service config to be updated from within the manager.

Changes from v1:
    * Lock HA domain inside update_resources_config
    * Don't set a default timeout in LRM
    * Different logging depending on whether timeout parameter is present
    * Split old 08/13 into two patches to separate renaming and adding the new command

Fabian Ebner (12):
  Make parameters for LRM resource commands more flexible
  Move code updating resource config from API2::HA::Resources to
    HA::Config
  Add update_service_config to HA environment interface
  Implement update_service_config for simulation
  Add timeout parameter for shutdown
  Use timeout for shutdown in LRM
  Add stop command to the API
  Rename target to param in simulation
  Add stop command to simulation
  Add crm command 'stop'
  Log timeout parameter when present
  Add test for the stop command

 src/PVE/API2/HA/Resources.pm                | 71 +++++++++++----------
 src/PVE/CLI/ha_manager.pm                   |  2 +
 src/PVE/HA/Config.pm                        | 37 +++++++++++
 src/PVE/HA/Env.pm                           |  6 ++
 src/PVE/HA/Env/PVE2.pm                      |  6 ++
 src/PVE/HA/LRM.pm                           | 22 ++++---
 src/PVE/HA/Manager.pm                       | 27 ++++++--
 src/PVE/HA/Resources.pm                     |  2 +-
 src/PVE/HA/Resources/PVECT.pm               | 14 ++--
 src/PVE/HA/Resources/PVEVM.pm               | 16 +++--
 src/PVE/HA/Sim/Env.pm                       |  6 ++
 src/PVE/HA/Sim/Hardware.pm                  | 42 +++++++++---
 src/test/test-stop-command1/README          |  2 +
 src/test/test-stop-command1/cmdlist         |  8 +++
 src/test/test-stop-command1/hardware_status |  5 ++
 src/test/test-stop-command1/log.expect      | 69 ++++++++++++++++++++
 src/test/test-stop-command1/manager_status  |  1 +
 src/test/test-stop-command1/service_config  |  6 ++
 18 files changed, 277 insertions(+), 65 deletions(-)
 create mode 100644 src/test/test-stop-command1/README
 create mode 100644 src/test/test-stop-command1/cmdlist
 create mode 100644 src/test/test-stop-command1/hardware_status
 create mode 100644 src/test/test-stop-command1/log.expect
 create mode 100644 src/test/test-stop-command1/manager_status
 create mode 100644 src/test/test-stop-command1/service_config

-- 
2.20.1





More information about the pve-devel mailing list