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 <piliu@redhat.com>
Acked-by: Kairui Song <kasong@redhat.com>
This commit is contained in:
Pingfan Liu 2019-08-26 17:03:13 +08:00 committed by Kairui Song
parent f0b5493b2e
commit a5ea190af2

View File

@ -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)