From a5ea190af28ebcba186a4f83e6e25356cc459207 Mon Sep 17 00:00:00 2001 From: Pingfan Liu Date: Mon, 26 Aug 2019 17:03:13 +0800 Subject: [PATCH] dracut-module-setup: filter out localhost for generic_fence_kdump The localhost is filtered out in case of is_pcs_fence_kdump, do it too in case of is_generic_fence_kdump. Signed-off-by: Pingfan Liu Acked-by: Kairui Song --- dracut-module-setup.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index 7333047..a995dfc 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -754,6 +754,21 @@ get_pcs_fence_kdump_args() { fi } +get_generic_fence_kdump_nodes() { + local filtered + local nodes + + nodes=$(get_option_value "fence_kdump_nodes") + for node in ${nodes}; do + # Skip its own node name + if is_localhost $node; then + continue + fi + filtered="$filtered $node" + done + echo $filtered +} + # setup fence_kdump in cluster # setup proper network and install needed files kdump_configure_fence_kdump () { @@ -762,7 +777,7 @@ kdump_configure_fence_kdump () { local args if is_generic_fence_kdump; then - nodes=$(get_option_value "fence_kdump_nodes") + nodes=$(get_generic_fence_kdump_nodes) elif is_pcs_fence_kdump; then nodes=$(get_pcs_fence_kdump_nodes)