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 <piliu@redhat.com>
Acked-by: Kairui Song <kasong@redhat.com>
This commit is contained in:
Pingfan Liu 2020-03-24 11:02:24 +08:00 committed by Kairui Song
parent b5b252ae27
commit 6348398743
1 changed files with 1 additions and 0 deletions

View File

@ -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" -`