From e4504065405a86a78a607e3e5ac8fcd4f6ba76f1 Mon Sep 17 00:00:00 2001 From: Vallari Agrawal Date: Tue, 11 Feb 2025 17:15:42 +0530 Subject: [PATCH] qa/workunits/nvmeof/fio_test: Log cluster status if fio fails Signed-off-by: Vallari Agrawal --- qa/suites/nvmeof/thrash/workloads/fio.yaml | 1 + qa/workunits/nvmeof/fio_test.sh | 21 ++++++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/qa/suites/nvmeof/thrash/workloads/fio.yaml b/qa/suites/nvmeof/thrash/workloads/fio.yaml index f9a0d0ebde50d..f17d05f04d8cf 100644 --- a/qa/suites/nvmeof/thrash/workloads/fio.yaml +++ b/qa/suites/nvmeof/thrash/workloads/fio.yaml @@ -7,5 +7,6 @@ tasks: - nvmeof/fio_test.sh --random_devices 200 env: RBD_POOL: mypool + NVMEOF_GROUP: mygroup0 IOSTAT_INTERVAL: '10' RUNTIME: '1800' diff --git a/qa/workunits/nvmeof/fio_test.sh b/qa/workunits/nvmeof/fio_test.sh index 7334dad3d53ab..b69b3403c9841 100755 --- a/qa/workunits/nvmeof/fio_test.sh +++ b/qa/workunits/nvmeof/fio_test.sh @@ -68,6 +68,18 @@ verify_fatal=1 direct=1 EOF +status_log() { + POOL="${RBD_POOL:-mypool}" + GROUP="${NVMEOF_GROUP:-mygroup0}" + ceph -s + ceph host ls + ceph orch ls + ceph orch ps + ceph health detail + ceph nvme-gw show $POOL $GROUP +} + + echo "[nvmeof.fio] starting fio test..." if [ -n "$IOSTAT_INTERVAL" ]; then @@ -79,6 +91,13 @@ if [ "$rbd_iostat" = true ]; then timeout 20 rbd perf image iostat $RBD_POOL --iterations $iterations & fi fio --showcmd $fio_file -sudo fio $fio_file + +set +e +sudo fio $fio_file +if [ $? -ne 0 ]; then + status_log + exit 1 +fi + echo "[nvmeof.fio] fio test successful!" -- 2.39.5