Skip to content

Commit 910dce2

Browse files
authored
Merge pull request ceph#61788 from VallariAg/wip-nvmeof-teuthology-improve
qa/suite/nvmeof: Add asserts to scalability_test and extra logs in fio_test
2 parents abdefd2 + fd8fbea commit 910dce2

File tree

4 files changed

+66
-7
lines changed

4 files changed

+66
-7
lines changed

qa/suites/nvmeof/basic/workloads/nvmeof_scalability.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,12 @@ tasks:
3131
no_coverage_and_limits: true
3232
timeout: 30m
3333
clients:
34+
client.0:
35+
- nvmeof/fio_test.sh
3436
client.3:
3537
- nvmeof/scalability_test.sh nvmeof.a,nvmeof.b
3638
- nvmeof/scalability_test.sh nvmeof.b,nvmeof.c,nvmeof.d
3739
- nvmeof/scalability_test.sh nvmeof.b,nvmeof.c
3840
env:
39-
SCALING_DELAYS: '120'
40-
RBD_POOL: mypool
41-
NVMEOF_GROUP: mygroup0
41+
SCALING_DELAYS: '300'
42+
RUNTIME: '1200'

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: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,26 @@ 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 orch host ls
76+
ceph orch ls
77+
ceph orch ps
78+
ceph health detail
79+
ceph nvme-gw show $POOL $GROUP
80+
sudo nvme list
81+
sudo nvme list | wc -l
82+
for device in $selected_drives; do
83+
echo "Processing device: $device"
84+
sudo nvme list-subsys /dev/$device
85+
sudo nvme id-ns /dev/$device
86+
done
87+
88+
}
89+
90+
7191
echo "[nvmeof.fio] starting fio test..."
7292

7393
if [ -n "$IOSTAT_INTERVAL" ]; then
@@ -79,6 +99,13 @@ if [ "$rbd_iostat" = true ]; then
7999
timeout 20 rbd perf image iostat $RBD_POOL --iterations $iterations &
80100
fi
81101
fio --showcmd $fio_file
82-
sudo fio $fio_file
102+
103+
set +e
104+
sudo fio $fio_file
105+
if [ $? -ne 0 ]; then
106+
status_log
107+
exit 1
108+
fi
109+
83110

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

qa/workunits/nvmeof/scalability_test.sh

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,40 @@ status_checks() {
1616
expected_count=$1
1717

1818
output=$(ceph nvme-gw show $POOL $GROUP)
19-
nvme_show=$(echo $output | grep -o '"AVAILABLE"' | wc -l)
20-
if [ "$nvme_show" -ne "$expected_count" ]; then
21-
return 1
19+
# nvme_show=$(echo $output | grep -o '"AVAILABLE"' | wc -l)
20+
# if [ "$nvme_show" -ne "$expected_count" ]; then
21+
# return 1
22+
# fi
23+
total_ns=$(echo $output | jq '.["num-namespaces"]')
24+
total_gws=$(echo $output | jq '.["num gws"]')
25+
expected_avg_ns=$((total_ns / total_gws))
26+
27+
if [ "$total_gws" -ne "$expected_count" ]; then
28+
return 1
2229
fi
30+
expected_ns_count=$(( $NVMEOF_NAMESPACES_COUNT * $NVMEOF_SUBSYSTEMS_COUNT ))
31+
if [ "$total_ns" -ne "$expected_ns_count" ]; then
32+
return 1
33+
fi
34+
35+
gateways=$(echo "$output" | jq -c '.["Created Gateways:"][]')
36+
37+
echo "$gateways" | while read -r gw; do
38+
gw_id=$(echo "$gw" | jq -r '.["gw-id"]')
39+
availability=$(echo "$gw" | jq -r '.["Availability"]')
40+
num_namespaces=$(echo "$gw" | jq '.["num-namespaces"]')
41+
42+
if [[ "$availability" != "AVAILABLE" ]]; then
43+
echo "Gateway $gw_id is not AVAILABLE."
44+
exit 1
45+
fi
46+
47+
diff=$((num_namespaces - expected_avg_ns))
48+
if [[ $diff -lt -1 || $diff -gt 1 ]]; then
49+
echo "Gateway $gw_id has num-namespaces ($num_namespaces), expected around $expected_ns. Indicates a problem in ns load-balancing."
50+
exit 1
51+
fi
52+
done
2353

2454
orch_ls=$(ceph orch ls)
2555
if ! echo "$orch_ls" | grep -q "$expected_count/$expected_count"; then

0 commit comments

Comments
 (0)