From 741beebdf8bdfd30d683a43990b239650b401d08 Mon Sep 17 00:00:00 2001 From: Peter Sabaini Date: Tue, 28 Apr 2026 12:25:16 +0200 Subject: [PATCH 1/2] test: collect diagnostics Signed-off-by: Peter Sabaini --- .github/workflows/tests.yml | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 07595a26..7f10a380 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -526,7 +526,22 @@ jobs: - name: Print logs for failure if: failure() run: | - sudo snap logs microceph -n 1000 + set +e + lxc list + lxc storage list + lxc storage volume list default + for c in node-wrk0 node-wrk1 node-wrk2 node-wrk3 ; do + echo "=== $c ===" + if ! lxc info "$c" >/dev/null 2>&1 ; then + echo "$c not found" + continue + fi + lxc exec "$c" -- sh -c "microceph status" || true + lxc exec "$c" -- sh -c "microceph.ceph -s" || true + lxc exec "$c" -- sh -c "microceph.ceph health detail" || true + lxc exec "$c" -- sh -c "sudo snap logs microceph -n 1000" || true + lxc exec "$c" -- sh -c "sudo snap logs microceph.daemon -n 1000" || true + done availability-zone-tests: name: Availability zone crush rule testing @@ -632,7 +647,22 @@ jobs: - name: Print logs for failure if: failure() run: | - sudo snap logs microceph -n 1000 + set +e + lxc list + lxc storage list + lxc storage volume list default + for c in node-wrk0 node-wrk1 node-wrk2 node-wrk3 ; do + echo "=== $c ===" + if ! lxc info "$c" >/dev/null 2>&1 ; then + echo "$c not found" + continue + fi + lxc exec "$c" -- sh -c "microceph status" || true + lxc exec "$c" -- sh -c "microceph.ceph -s" || true + lxc exec "$c" -- sh -c "microceph.ceph health detail" || true + lxc exec "$c" -- sh -c "sudo snap logs microceph -n 1000" || true + lxc exec "$c" -- sh -c "sudo snap logs microceph.daemon -n 1000" || true + done test-sequential-mon-host-refresh: name: Regression test for sequential join mon host refresh (issue #556) From ebc71e8bee302c4a826a7b12d93e3d7f88b47b98 Mon Sep 17 00:00:00 2001 From: Peter Sabaini Date: Tue, 28 Apr 2026 12:55:35 +0200 Subject: [PATCH 2/2] test: address review Signed-off-by: Peter Sabaini --- .github/workflows/tests.yml | 36 ++---------------------------------- tests/scripts/actionutils.sh | 27 +++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 34 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7f10a380..09f1c3e2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -525,23 +525,7 @@ jobs: - name: Print logs for failure if: failure() - run: | - set +e - lxc list - lxc storage list - lxc storage volume list default - for c in node-wrk0 node-wrk1 node-wrk2 node-wrk3 ; do - echo "=== $c ===" - if ! lxc info "$c" >/dev/null 2>&1 ; then - echo "$c not found" - continue - fi - lxc exec "$c" -- sh -c "microceph status" || true - lxc exec "$c" -- sh -c "microceph.ceph -s" || true - lxc exec "$c" -- sh -c "microceph.ceph health detail" || true - lxc exec "$c" -- sh -c "sudo snap logs microceph -n 1000" || true - lxc exec "$c" -- sh -c "sudo snap logs microceph.daemon -n 1000" || true - done + run: ~/actionutils.sh dump_multinode_debug availability-zone-tests: name: Availability zone crush rule testing @@ -646,23 +630,7 @@ jobs: - name: Print logs for failure if: failure() - run: | - set +e - lxc list - lxc storage list - lxc storage volume list default - for c in node-wrk0 node-wrk1 node-wrk2 node-wrk3 ; do - echo "=== $c ===" - if ! lxc info "$c" >/dev/null 2>&1 ; then - echo "$c not found" - continue - fi - lxc exec "$c" -- sh -c "microceph status" || true - lxc exec "$c" -- sh -c "microceph.ceph -s" || true - lxc exec "$c" -- sh -c "microceph.ceph health detail" || true - lxc exec "$c" -- sh -c "sudo snap logs microceph -n 1000" || true - lxc exec "$c" -- sh -c "sudo snap logs microceph.daemon -n 1000" || true - done + run: ~/actionutils.sh dump_multinode_debug test-sequential-mon-host-refresh: name: Regression test for sequential join mon host refresh (issue #556) diff --git a/tests/scripts/actionutils.sh b/tests/scripts/actionutils.sh index d40cc8dc..b7c8f969 100755 --- a/tests/scripts/actionutils.sh +++ b/tests/scripts/actionutils.sh @@ -999,6 +999,33 @@ function dump_microceph_debug() { sudo snap logs microceph -n 1000 } +function dump_multinode_debug() { + set +e + + local nodes=("${@}") + if [[ ${#nodes[@]} -eq 0 ]]; then + nodes=(node-wrk0 node-wrk1 node-wrk2 node-wrk3) + fi + + lxc list || true + lxc storage list || true + lxc storage volume list default || true + + for node in "${nodes[@]}" ; do + echo "=== ${node} ===" + if ! lxc info "${node}" >/dev/null 2>&1 ; then + echo "${node} not found" + continue + fi + + lxc exec "${node}" -- sh -c "microceph status" || true + lxc exec "${node}" -- sh -c "microceph.ceph -s" || true + lxc exec "${node}" -- sh -c "microceph.ceph health detail" || true + lxc exec "${node}" -- sh -c "sudo snap logs microceph -n 1000" || true + lxc exec "${node}" -- sh -c "sudo snap logs microceph.daemon -n 1000" || true + done +} + function upgrade_multinode() { # Refresh to local version, checking health for container in node-wrk0 node-wrk1 node-wrk2 node-wrk3 ; do