Archived
fix(ha-test): remove Debian LVM handlers and fix corosync authkey length
- Remove before/after-resync-target LVM handlers (snapshot-resync-target-lvm.sh doesn't exist in NixOS; exit code 127 caused DRBD to drop connections on sync) - Remove split-brain handler pointing to /usr/lib/drbd/ (Debian path) - Fix testAuthKey from 126 to 128 bytes (corosync minimum is 1024 bits) - Fix cluster-init.sh quorum check: corosync-quorumtool has no -q flag; use -s | grep 'Quorate: Yes' instead Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HaH1cSGvhogRP5ExoF6nD8
This commit is contained in:
@@ -39,7 +39,7 @@ die() { echo "[cluster-init] ERROR: $*" >&2; exit 1; }
|
||||
# ── 1. Wait for corosync quorum ──────────────────────────────────────────
|
||||
log "Waiting for corosync quorum..."
|
||||
for i in $(seq 1 30); do
|
||||
if corosync-quorumtool -q &>/dev/null; then
|
||||
if corosync-quorumtool -s 2>/dev/null | grep -q 'Quorate:.*Yes'; then
|
||||
log "Quorum established"
|
||||
break
|
||||
fi
|
||||
|
||||
@@ -8,9 +8,9 @@ let
|
||||
node2Ip = "192.168.2.201";
|
||||
drbdPort = 7789;
|
||||
|
||||
# Test-only corosync authkey (128 bytes minimum).
|
||||
# Test-only corosync authkey (128 bytes = 1024 bits minimum for corosync).
|
||||
# Not secret — this is a disposable test cluster, not production.
|
||||
testAuthKey = "ha-test-cluster-auth-key-NOT-FOR-PRODUCTION-use-corosync-keygen-for-real-clusters-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
|
||||
testAuthKey = "ha-test-cluster-auth-key-NOT-FOR-PRODUCTION-use-corosync-keygen-for-real-clusters-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
|
||||
|
||||
# OCF agent path (from pacemaker's --with-ocfdir).
|
||||
# We expose this on PATH so custom scripts can find each other.
|
||||
@@ -97,11 +97,9 @@ in
|
||||
fencing resource-only;
|
||||
}
|
||||
handlers {
|
||||
# Called by DRBD when a split-brain is detected and this node is
|
||||
# in the secondary role — notifies pacemaker to fence the split node.
|
||||
split-brain "/usr/lib/drbd/notify-split-brain.sh root";
|
||||
before-resync-target "/usr/lib/drbd/snapshot-resync-target-lvm.sh -p 15 -- -c 16k";
|
||||
after-resync-target "/usr/lib/drbd/unsnapshot-resync-target-lvm.sh";
|
||||
# NOTE: LVM-specific before/after-resync-target handlers omitted
|
||||
# (raw /dev/sdb, no LVM). split-brain handler also omitted —
|
||||
# Pacemaker STONITH manages split-brain fencing for the test cluster.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user