Archived
fix(ha/cluster-init): explicitly start pacemaker after corosync restart
Check NixOS configurations / eval-hosts (push) Successful in 10m25s
Check NixOS configurations / eval-hosts (push) Successful in 10m25s
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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HaH1cSGvhogRP5ExoF6nD8
This commit is contained in:
@@ -103,11 +103,16 @@ n2_ssh "mkdir -p /etc/corosync"
|
|||||||
n2_scp "$AUTHKEY" "$AUTHKEY"
|
n2_scp "$AUTHKEY" "$AUTHKEY"
|
||||||
n2_ssh "chmod 0400 '${AUTHKEY}'"
|
n2_ssh "chmod 0400 '${AUTHKEY}'"
|
||||||
|
|
||||||
log "Restarting corosync on both nodes..."
|
log "Restarting corosync and pacemaker on both nodes..."
|
||||||
systemctl restart corosync
|
systemctl restart corosync
|
||||||
n2_ssh "systemctl restart corosync"
|
n2_ssh "systemctl restart corosync"
|
||||||
sleep 3
|
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 ────────────────────────────────────────────────────
|
# ── 1. Corosync quorum ────────────────────────────────────────────────────
|
||||||
log "Waiting for corosync quorum..."
|
log "Waiting for corosync quorum..."
|
||||||
for i in $(seq 1 30); do
|
for i in $(seq 1 30); do
|
||||||
|
|||||||
Reference in New Issue
Block a user