Skip to content

Commit e450406

Browse files
committed
qa/workunits/nvmeof/fio_test: Log cluster status if fio fails
Signed-off-by: Vallari Agrawal <[email protected]>
1 parent 5b16367 commit e450406

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

qa/suites/nvmeof/thrash/workloads/fio.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ tasks:
77
- nvmeof/fio_test.sh --random_devices 200
88
env:
99
RBD_POOL: mypool
10+
NVMEOF_GROUP: mygroup0
1011
IOSTAT_INTERVAL: '10'
1112
RUNTIME: '1800'

qa/workunits/nvmeof/fio_test.sh

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,18 @@ verify_fatal=1
6868
direct=1
6969
EOF
7070

71+
status_log() {
72+
POOL="${RBD_POOL:-mypool}"
73+
GROUP="${NVMEOF_GROUP:-mygroup0}"
74+
ceph -s
75+
ceph host ls
76+
ceph orch ls
77+
ceph orch ps
78+
ceph health detail
79+
ceph nvme-gw show $POOL $GROUP
80+
}
81+
82+
7183
echo "[nvmeof.fio] starting fio test..."
7284

7385
if [ -n "$IOSTAT_INTERVAL" ]; then
@@ -79,6 +91,13 @@ if [ "$rbd_iostat" = true ]; then
7991
timeout 20 rbd perf image iostat $RBD_POOL --iterations $iterations &
8092
fi
8193
fio --showcmd $fio_file
82-
sudo fio $fio_file
94+
95+
set +e
96+
sudo fio $fio_file
97+
if [ $? -ne 0 ]; then
98+
status_log
99+
exit 1
100+
fi
101+
83102

84103
echo "[nvmeof.fio] fio test successful!"

0 commit comments

Comments
 (0)