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:
2026-07-27 06:40:57 +10:00
co-authored by Claude Sonnet 4.6
parent 34c55f27ca
commit 23634134f0
2 changed files with 6 additions and 8 deletions
+5 -7
View File
@@ -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.
}
}