From e5e050737155dcc147b60e8da543d91f40c34d18 Mon Sep 17 00:00:00 2001 From: WANG Chao Date: Fri, 20 Dec 2013 15:09:48 +0800 Subject: [PATCH] kdump.sh: send fence kdump message to other nodes in the cluster In 2nd kernel, to prevent the crashed system from being fenced off, fence kdump message must be send to other nodes in the cluster periodically before dumping process. We preserve every node's name in /etc/fence_kdump_nodes in the initrd, so we parse this file and send notify them. Signed-off-by: WANG Chao Tested-by: Zhi Zou Tested-by: Marek Grac Acked-by: Vivek Goyal --- dracut-kdump.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/dracut-kdump.sh b/dracut-kdump.sh index 4d8616f..d9e65ac 100755 --- a/dracut-kdump.sh +++ b/dracut-kdump.sh @@ -287,6 +287,21 @@ read_kdump_conf() done < $conf_file } +fence_kdump_notify() +{ + local nodes + + if [ -f $FENCE_KDUMP_NODES ]; then + if [ -f $FENCE_KDUMP_CONFIG ]; then + . $FENCE_KDUMP_CONFIG + fi + + read nodes < $FENCE_KDUMP_NODES + $FENCE_KDUMP_SEND $FENCE_KDUMP_OPTS $nodes & + fi +} + +fence_kdump_notify read_kdump_conf if [ -z "$CORE_COLLECTOR" ];then