From 6348398743a6a7c684deac93dab3bef868f3b6a9 Mon Sep 17 00:00:00 2001 From: Pingfan Liu Date: Tue, 24 Mar 2020 11:02:24 +0800 Subject: [PATCH] dracut-module-setup.sh: ensure cluster info is ready before query There is a race issue between "pcs" and "kdumpctl restart" -1. set up cluster # pcs cluster setup --start mycluster node1 node2 # pcs stonith create kdump fence_kdump pcmk_reboot_action="off" # pcs stonith level add 1 node1 kdump # pcs stonith level add 1 node2 kdump -2. Then here comes the command _immediately_ in kdumpctl # pcs cluster cib But due to some pcs internal mechanism, "pcs cluster cib" can not fetch the updated info in time. Fix these issue by forcing the upgrade of cib. Signed-off-by: Pingfan Liu Acked-by: Kairui Song --- dracut-module-setup.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index fdef509..685b858 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -678,6 +678,7 @@ is_localhost() { get_pcs_fence_kdump_nodes() { local nodes + pcs cluster sync && pcs cluster cib-upgrade # get cluster nodes from cluster cib, get interface and ip address nodelist=`pcs cluster cib | xmllint --xpath "/cib/status/node_state/@uname" -`