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:
Ilya Dryomov 2018-02-23 11:03:33 +01:00
parent 1e34922fcd
commit 72edaae04d
2 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,5 @@
tasks:
- workunit:
clients:
all:
- rbd/krbd_latest_osdmap_on_map.sh

View 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