Skip to content

Commit f98253b

Browse files
authored
Merge pull request ClusterLabs#1547 from petrpavlu/galera-bootstrap
galera: Fix automatic recovery when a cluster was not gracefully stopped
2 parents 104bb45 + 73551ac commit f98253b

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

heartbeat/galera

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -604,12 +604,17 @@ detect_safe_to_bootstrap()
604604
seqno=$(sed -n 's/^seqno:\s*\(.*\)$/\1/p' < ${OCF_RESKEY_datadir}/grastate.dat)
605605
fi
606606

607-
if [ -z "$uuid" ] || [ -z "$seqno" ] || \
608-
[ "$uuid" = "00000000-0000-0000-0000-000000000000" ] || \
609-
[ "$seqno" = "-1" ]; then
607+
if [ -z "$uuid" ] || \
608+
[ "$uuid" = "00000000-0000-0000-0000-000000000000" ]; then
610609
clear_safe_to_bootstrap
611610
return
612611
fi
612+
if [ "$safe_to_bootstrap" = "1" ]; then
613+
if [ -z "$seqno" ] || [ "$seqno" = "-1" ]; then
614+
clear_safe_to_bootstrap
615+
return
616+
fi
617+
fi
613618

614619
if [ "$safe_to_bootstrap" = "1" ] || [ "$safe_to_bootstrap" = "0" ]; then
615620
set_safe_to_bootstrap $safe_to_bootstrap

0 commit comments

Comments
 (0)