mirror of
https://github.com/ceph/ceph
synced 2024-12-19 18:02:46 +00:00
qa: krbd latest-osdmap-on-map test
Make sure we get the latest osdmap when using an existing client. Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:
parent
1e34922fcd
commit
72edaae04d
@ -0,0 +1,5 @@
|
||||
tasks:
|
||||
- workunit:
|
||||
clients:
|
||||
all:
|
||||
- rbd/krbd_latest_osdmap_on_map.sh
|
30
qa/workunits/rbd/krbd_latest_osdmap_on_map.sh
Executable file
30
qa/workunits/rbd/krbd_latest_osdmap_on_map.sh
Executable file
@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
function run_test() {
|
||||
ceph osd pool create foo 12
|
||||
rbd pool init foo
|
||||
rbd create --size 1 foo/img
|
||||
|
||||
local dev
|
||||
dev=$(sudo rbd map foo/img)
|
||||
sudo rbd unmap $dev
|
||||
|
||||
ceph osd pool delete foo foo --yes-i-really-really-mean-it
|
||||
}
|
||||
|
||||
NUM_ITER=20
|
||||
|
||||
for ((i = 0; i < $NUM_ITER; i++)); do
|
||||
run_test
|
||||
done
|
||||
|
||||
rbd create --size 1 img
|
||||
DEV=$(sudo rbd map img)
|
||||
for ((i = 0; i < $NUM_ITER; i++)); do
|
||||
run_test
|
||||
done
|
||||
sudo rbd unmap $DEV
|
||||
|
||||
echo OK
|
Loading…
Reference in New Issue
Block a user