From 5c6cd7f40f3579f7be768c753f8353bd4e323e71 Mon Sep 17 00:00:00 2001 From: "goodolclint-claude[bot]" <323206664+goodolclint-claude[bot]@users.noreply.github.com> Date: Tue, 1 Sep 2026 07:27:31 +0000 Subject: [PATCH] ci: probe whether pmxcfs came up clustered or in local mode Run 173 left node B with healthy corosync (2-member primary component, both links connected) but no /etc/pve/corosync.conf, no dcdb/status journal lines, and pvecm status reporting it is not part of a cluster. That file is database-backed: pmxcfs creates it only when it starts with no config.db and imports /etc/corosync/corosync.conf, so a surviving standalone config.db would mean silent local mode. Capture the package versions, pmxcfs command line, /etc/pve mount, .members, the config.db and its backup dir, whether the database holds a corosync.conf row, and the CPG group membership. Read-only; the sqlite3 CLI is not guaranteed on a PVE node, so fall back to strings. Co-Authored-By: Claude Opus 5 (1M context) --- .../scripts/diagnose-cluster.sh | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/infrastructure/scripts/diagnose-cluster.sh b/tests/infrastructure/scripts/diagnose-cluster.sh index e5c01d1..ade5509 100644 --- a/tests/infrastructure/scripts/diagnose-cluster.sh +++ b/tests/infrastructure/scripts/diagnose-cluster.sh @@ -49,6 +49,26 @@ echo echo "--- addresses ---" ip -4 -o addr show scope global echo +echo "--- pmxcfs mode: cluster or local? ---" +# /etc/pve/corosync.conf is database-backed; pmxcfs only creates it when it +# starts with no config.db and imports /etc/corosync/corosync.conf. A surviving +# standalone config.db means silent local mode with corosync otherwise healthy. +dpkg-query -W pve-cluster corosync 2>&1 +tr '\0' ' ' < "/proc/$(systemctl show pve-cluster -p MainPID --value)/cmdline" 2>&1; echo +findmnt --target /etc/pve --output TARGET,SOURCE,FSTYPE 2>&1 +echo ".members: $(cat /etc/pve/.members 2>&1 | tr -d '\n')" +ls -la /var/lib/pve-cluster/ 2>&1 +ls -la /var/lib/pve-cluster/backup/ 2>&1 +if command -v sqlite3 >/dev/null 2>&1; then + sqlite3 -readonly /var/lib/pve-cluster/config.db \ + "PRAGMA quick_check; SELECT name,version,writer,mtime,length(data) FROM tree WHERE name='corosync.conf';" 2>&1 +else + echo "sqlite3 absent; corosync.conf occurrences in config.db: $(strings /var/lib/pve-cluster/config.db 2>/dev/null | grep -c '^corosync\.conf$')" +fi +echo +echo "--- corosync-cpgtool (pmxcfs joins dcdb/status CPG groups when clustered) ---" +corosync-cpgtool 2>&1 +echo echo "--- corosync.conf ---" cat /etc/pve/corosync.conf 2>&1 || cat /etc/corosync/corosync.conf 2>&1 echo