diff --git a/scripts/ha/cluster-init.sh b/scripts/ha/cluster-init.sh index 917b505..71e360b 100755 --- a/scripts/ha/cluster-init.sh +++ b/scripts/ha/cluster-init.sh @@ -103,11 +103,16 @@ n2_ssh "mkdir -p /etc/corosync" n2_scp "$AUTHKEY" "$AUTHKEY" n2_ssh "chmod 0400 '${AUTHKEY}'" -log "Restarting corosync on both nodes..." +log "Restarting corosync and pacemaker on both nodes..." systemctl restart corosync n2_ssh "systemctl restart corosync" sleep 3 +log "Starting pacemaker on both nodes (may have failed at boot before authkey was placed)..." +systemctl start pacemaker 2>/dev/null || systemctl restart pacemaker 2>/dev/null || true +n2_ssh "systemctl start pacemaker 2>/dev/null || systemctl restart pacemaker 2>/dev/null || true" +sleep 2 + # ── 1. Corosync quorum ──────────────────────────────────────────────────── log "Waiting for corosync quorum..." for i in $(seq 1 30); do