Skip to content

Commit e25b81e

Browse files
authored
Merge pull request ceph#58781 from idryomov/wip-67097
qa/suites/krbd: stress test for recovering from watch errors for -o exclusive Reviewed-by: Ramana Raja <[email protected]>
2 parents ee7c187 + 2a9f92f commit e25b81e

File tree

5 files changed

+56
-9
lines changed

5 files changed

+56
-9
lines changed

qa/suites/krbd/mirror/tasks/compare-mirror-image-alternate-primary.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
overrides:
22
install:
3-
ceph:
4-
extra_system_packages:
5-
- pv
3+
extra_system_packages:
4+
- pv
65
tasks:
76
- workunit:
87
clients:

qa/suites/krbd/mirror/tasks/compare-mirror-images.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
overrides:
22
install:
3-
ceph:
4-
extra_system_packages:
5-
- pv
3+
extra_system_packages:
4+
- pv
65
tasks:
76
- workunit:
87
clients:
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
overrides:
2+
ceph:
3+
conf:
4+
global:
5+
osd pool default size: 1
6+
osd:
7+
osd shutdown pgref assert: true
8+
roles:
9+
- [mon.a, mgr.x, osd.0, client.0]
10+
11+
tasks:
12+
- install:
13+
extra_system_packages:
14+
- fio
15+
- ceph:
16+
- workunit:
17+
clients:
18+
all:
19+
- rbd/krbd_watch_errors_exclusive.sh

qa/suites/krbd/thrash/workloads/krbd_diff_continuous.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
overrides:
22
install:
3-
ceph:
4-
extra_system_packages:
5-
- pv
3+
extra_system_packages:
4+
- pv
65
tasks:
76
- workunit:
87
clients:
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/usr/bin/env bash
2+
3+
set -ex
4+
set -o pipefail
5+
6+
readonly IMAGE_NAME="watch-errors-exclusive-test"
7+
8+
rbd create -s 1G --image-feature exclusive-lock,object-map "${IMAGE_NAME}"
9+
10+
# induce a watch error every 30 seconds
11+
dev="$(sudo rbd device map -o exclusive,osdkeepalive=60 "${IMAGE_NAME}")"
12+
dev_id="${dev#/dev/rbd}"
13+
14+
sudo dmesg -C
15+
16+
# test that a workload doesn't encounter EIO errors
17+
fio --name test --filename="${dev}" --ioengine=libaio --direct=1 \
18+
--rw=randwrite --norandommap --randrepeat=0 --bs=512 --iodepth=128 \
19+
--time_based --runtime=1h --eta=never
20+
21+
num_errors="$(dmesg | grep -c "rbd${dev_id}: encountered watch error")"
22+
echo "Recorded ${num_errors} watch errors"
23+
24+
sudo rbd device unmap "${dev}"
25+
26+
if ((num_errors < 60)); then
27+
echo "Too few watch errors"
28+
exit 1
29+
fi
30+
31+
echo OK

0 commit comments

Comments
 (0)