[pve-devel] [PATCH v2 ha-manager 06/12] Use timeout for shutdown in LRM

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


Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---
 src/PVE/HA/LRM.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/PVE/HA/LRM.pm b/src/PVE/HA/LRM.pm
index 3b4a572..e5eee94 100644
--- a/src/PVE/HA/LRM.pm
+++ b/src/PVE/HA/LRM.pm
@@ -535,7 +535,7 @@ sub manage_resources {
 	my $req_state = $sd->{state};
 	next if !defined($req_state);
 	next if $req_state eq 'freeze';
-	$self->queue_resource_command($sid, $sd->{uid}, $req_state, {'target' => $sd->{target}});
+	$self->queue_resource_command($sid, $sd->{uid}, $req_state, {'target' => $sd->{target}, 'timeout' => $sd->{timeout}});
     }
 
     return $self->run_workers();
@@ -776,7 +776,7 @@ sub exec_resource_agent {
 
 	$haenv->log("info", "stopping service $sid");
 
-	$plugin->shutdown($haenv, $id);
+	$plugin->shutdown($haenv, $id, $params->{timeout});
 
 	$running = $plugin->check_running($haenv, $id);
 
-- 
2.20.1





More information about the pve-devel mailing list