From: Vallari Agrawal Date: Tue, 11 Feb 2025 11:45:42 +0000 (+0530) Subject: qa/workunits/nvmeof/fio_test: Log cluster status if fio fails X-Git-Tag: v20.0.0~66^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e4504065405a86a78a607e3e5ac8fcd4f6ba76f1;p=ceph.git qa/workunits/nvmeof/fio_test: Log cluster status if fio fails Signed-off-by: Vallari Agrawal --- diff --git a/qa/suites/nvmeof/thrash/workloads/fio.yaml b/qa/suites/nvmeof/thrash/workloads/fio.yaml index f9a0d0ebde5..f17d05f04d8 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 7334dad3d53..b69b3403c98 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!"