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

Thomas Lamprecht t.lamprecht at proxmox.com
Thu Sep 26 15:15:09 CEST 2019


On 9/26/19 1:38 PM, Fabian Ebner wrote:
> 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.
> 

In general: nice work and patch separation, quite nice to review!

The overall concept looks OK, I'm need to take a closer look tomorrow
especially at 02/13 (the service-config) changes, which seems to have
some issues (missing locking) but that should be solvable.

> Fabian Ebner (13):
>   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
>   Add stop command to simulation
>   Add crm command 'stop'
>   Log timeout parameter as well
>   Add test for the stop command
>   Whitespace cleanup
>   Cleanup
> 
>  src/PVE/API2/HA/Resources.pm                | 78 ++++++++++++---------
>  src/PVE/CLI/ha_manager.pm                   |  2 +
>  src/PVE/HA/Config.pm                        | 34 +++++++++
>  src/PVE/HA/Env.pm                           |  6 ++
>  src/PVE/HA/Env/PVE2.pm                      |  6 ++
>  src/PVE/HA/LRM.pm                           | 20 +++---
>  src/PVE/HA/Manager.pm                       | 30 ++++++--
>  src/PVE/HA/Resources.pm                     |  2 +-
>  src/PVE/HA/Resources/PVECT.pm               | 14 ++--
>  src/PVE/HA/Resources/PVEVM.pm               | 17 +++--
>  src/PVE/HA/Sim/Env.pm                       |  6 ++
>  src/PVE/HA/Sim/Hardware.pm                  | 42 ++++++++---
>  src/test/test-cfs-unavailable1/log.expect   |  2 +-
>  src/test/test-cfs-unavailable2/log.expect   |  2 +-
>  src/test/test-reboot1/log.expect            |  2 +-
>  src/test/test-resource-failure4/log.expect  | 10 +--
>  src/test/test-service-command1/log.expect   |  2 +-
>  src/test/test-shutdown-policy1/log.expect   |  2 +-
>  src/test/test-shutdown-policy2/log.expect   |  2 +-
>  src/test/test-shutdown1/log.expect          |  2 +-
>  src/test/test-shutdown2/log.expect          |  2 +-
>  src/test/test-shutdown3/log.expect          |  2 +-
>  src/test/test-shutdown4/log.expect          |  2 +-
>  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 ++
>  29 files changed, 293 insertions(+), 85 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
> 





More information about the pve-devel mailing list