From fe9fc7364b96e1600a19c8ddff814a4ab5e016cb Mon Sep 17 00:00:00 2001 From: beatzaplenty Date: Tue, 28 Jul 2026 19:47:33 +1000 Subject: [PATCH] fix(ha/cluster-init): explicitly start pacemaker after corosync restart At first boot, pacemaker fails with 'Dependency failed' because ipa-activation fails (IPA not enrolled yet) before corosync/authkey are ready, causing a systemd boot-ordering race. The service recovers fine when started manually. Add an explicit 'systemctl start pacemaker' on both nodes immediately after restarting corosync so cluster-init doesn't time out waiting for it. Co-Authored-By: Claude Sonnet 4.6 Claude-Session: https://claude.ai/code/session_01HaH1cSGvhogRP5ExoF6nD8 --- scripts/ha/cluster-init.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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