[pve-devel] [PATCH v2 ha-manager 09/12] Add stop command to simulation
Fabian Ebner
f.ebner at proxmox.com
Mon Sep 30 09:22:34 CEST 2019
Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---
src/PVE/HA/Sim/Hardware.pm | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/PVE/HA/Sim/Hardware.pm b/src/PVE/HA/Sim/Hardware.pm
index ac0c142..7e1a8bc 100644
--- a/src/PVE/HA/Sim/Hardware.pm
+++ b/src/PVE/HA/Sim/Hardware.pm
@@ -543,6 +543,7 @@ sub get_cfs_state {
# restart-lrm <node>
# service <sid> <started|disabled|stopped|ignored>
# service <sid> <migrate|relocate> <target>
+# service <sid> stop <timeout>
# service <sid> lock/unlock [lockname]
sub sim_hardware_cmd {
@@ -660,6 +661,13 @@ sub sim_hardware_cmd {
$self->queue_crm_commands_nolock("$action $sid $param");
+ } elsif ($action eq 'stop') {
+
+ die "sim_hardware_cmd: missing timeout for '$action' command"
+ if !defined($param);
+
+ $self->queue_crm_commands_nolock("$action $sid $param");
+
} elsif ($action eq 'add') {
$self->add_service($sid, {state => 'started', node => $param});
--
2.20.1
More information about the pve-devel
mailing list