test-lab: add two-node HA file-server test cluster config

Disposable test VMs (ha-test-node1 / ha-test-node2, VMIDs 200/201 on pve1)
to evaluate whether the DRBD + XFS + LIO + Corosync + Pacemaker stack
runs correctly on NixOS before deciding NixOS vs Debian for production.

Includes:
- test-lab/ha/disko.nix: 20G boot disk layout (smaller than production)
- test-lab/ha/common.nix: shared HA stack (drbd, corosync, pacemaker,
  targetcli-fb, xfsprogs), OCF PATH workaround for nixpkgs#207891
- test-lab/ha/node1.nix / node2.nix: per-node hostname + static IP
- test-lab/ha/fence-pve-ssh.py: Proxmox SSH fence agent for STONITH
- test-lab/ha/cluster-init.sh: one-shot cluster bootstrap script
- test-lab/ha/cluster-enable-stonith.sh: enables STONITH post-key-deploy
- flake.nix: adds ha-test-node1 / ha-test-node2 nixosConfigurations
  (bypasses mkTarget / clan-core / sops-nix — test-only)

These VMs must be destroyed once acceptance testing is complete.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-07-27 05:46:04 +10:00
co-authored by Claude Sonnet 4.6
parent d3d6382360
commit 750121e9dd
8 changed files with 854 additions and 1 deletions
+12
View File
@@ -0,0 +1,12 @@
{ ... }:
# ha-test-node1: VMID 200, 192.168.2.200/24
{
networking.hostName = "ha-test-node1";
networking.hostId = "a1b2c3d4"; # random, required by ZFS (not used here) but harmless
networking.interfaces.ens18.ipv4.addresses = [{
address = "192.168.2.200";
prefixLength = 24;
}];
}