[pve-devel] [PATCH v3 ha-manager 0/9] Implement a stop command for HA
Fabian Ebner
f.ebner at proxmox.com
Wed Oct 2 11:46:01 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 v2:
* Reorder parameters in 'update_service_config' to make it cleaner
* Squash old 05/06 which introduce the timeout for shutdown
* Do not expose the stop command to the API, instead introduce
a crm-command command in the CLI and implement stop as a
subcommand locally
Fabian Ebner (9):
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
Introduce crm-command to CLI and add stop as a subcommand
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 | 34 +---------
src/PVE/CLI/ha_manager.pm | 46 +++++++++++++-
src/PVE/HA/Config.pm | 37 +++++++++++
src/PVE/HA/Env.pm | 6 ++
src/PVE/HA/Env/PVE2.pm | 6 ++
src/PVE/HA/LRM.pm | 10 ++-
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 | 22 +++++++
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, 265 insertions(+), 52 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