From 191bec5d1d8c053d3de1a5627887807f600d6296 Mon Sep 17 00:00:00 2001 From: Jan Friesse Date: Thu, 14 Jan 2021 14:00:42 +0100 Subject: [PATCH] init: Use corosync-cfgtool for shutdown ... to trigger cfg shutdown callbacks. Signed-off-by: Jan Friesse Reviewed-by: Christine Caulfield --- init/corosync.in | 3 +++ init/corosync.service.in | 1 + 2 files changed, 4 insertions(+) diff --git a/init/corosync.in b/init/corosync.in index 1debe552..30a06838 100755 --- a/init/corosync.in +++ b/init/corosync.in @@ -176,6 +176,9 @@ stop() ! status -p "$prog_pid_file" "$prog" > /dev/null 2>&1 && return echo -n "Signaling $desc ($prog) to terminate: " + # Call cfgtool to trigger shutdown callbacks + corosync-cfgtool -H --force > /dev/null 2>&1 + # Send TERM signal (if cfgtool -H failed) kill -TERM "$(pid_var_run $prog_pid_file)" > /dev/null 2>&1 success echo diff --git a/init/corosync.service.in b/init/corosync.service.in index 654e41fc..bd2a48a9 100644 --- a/init/corosync.service.in +++ b/init/corosync.service.in @@ -8,6 +8,7 @@ After=network-online.target [Service] EnvironmentFile=-@INITCONFIGDIR@/corosync ExecStart=@SBINDIR@/corosync -f $COROSYNC_OPTIONS +ExecStop=@SBINDIR@/corosync-cfgtool -H --force Type=notify # In typical systemd deployments, both standard outputs are forwarded to