From: Sage Weil Date: Fri, 21 Jul 2017 22:01:23 +0000 (-0400) Subject: qa/standalone/ceph-helpers: factor rbd pool create out of run_mon X-Git-Tag: v12.1.2~126^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cabad62242c2b948a6ba6d5b2d6c6813daefecaa;p=ceph.git qa/standalone/ceph-helpers: factor rbd pool create out of run_mon Signed-off-by: Sage Weil --- diff --git a/qa/standalone/ceph-helpers.sh b/qa/standalone/ceph-helpers.sh index 3c623681e0d0..219e30194202 100755 --- a/qa/standalone/ceph-helpers.sh +++ b/qa/standalone/ceph-helpers.sh @@ -388,7 +388,7 @@ function test_kill_daemons() { # @param ... can be any option valid for ceph-mon # @return 0 on success, 1 on error # -function run_mon_no_pool() { +function run_mon() { local dir=$1 shift local id=$1 @@ -420,6 +420,7 @@ function run_mon_no_pool() { --run-dir=$dir \ --pid-file=$dir/\$name.pid \ --mon-allow-pool-delete \ + --mon-osd-backfillfull-ratio .99 \ "$@" || return 1 cat > $dir/ceph.conf < $empty_map.txt diff --git a/qa/standalone/osd/osd-copy-from.sh b/qa/standalone/osd/osd-copy-from.sh index 37851fab9a6f..3dcb0a8fa52a 100755 --- a/qa/standalone/osd/osd-copy-from.sh +++ b/qa/standalone/osd/osd-copy-from.sh @@ -43,6 +43,7 @@ function TEST_copy_from() { run_mgr $dir x || return 1 run_osd $dir 0 || return 1 run_osd $dir 1 || return 1 + create_rbd_pool || return 1 # success rados -p rbd put foo $(which rados) diff --git a/qa/standalone/osd/osd-fast-mark-down.sh b/qa/standalone/osd/osd-fast-mark-down.sh index 3d27930e6e6e..3b8e5a31b500 100755 --- a/qa/standalone/osd/osd-fast-mark-down.sh +++ b/qa/standalone/osd/osd-fast-mark-down.sh @@ -77,6 +77,8 @@ function test_fast_kill() { pids[$oi]=$(cat $dir/osd.$oi.pid) done + create_rbd_pool || return 1 + # make some objects so osds to ensure connectivity between osds rados -p rbd bench 10 write -b 4096 --max-objects 128 --no-cleanup sleep 1 diff --git a/qa/standalone/osd/osd-reuse-id.sh b/qa/standalone/osd/osd-reuse-id.sh index 04666e1b634f..807c0abe5cb4 100755 --- a/qa/standalone/osd/osd-reuse-id.sh +++ b/qa/standalone/osd/osd-reuse-id.sh @@ -39,6 +39,7 @@ function TEST_reuse_id() { run_mgr $dir x || return 1 run_osd $dir 0 || return 1 run_osd $dir 1 || return 1 + create_rbd_pool || return 1 wait_for_clean || return 1 destroy_osd $dir 1 || return 1 run_osd $dir 1 || return 1 diff --git a/qa/standalone/osd/osd-scrub-repair.sh b/qa/standalone/osd/osd-scrub-repair.sh index 9b3083b05ab3..26c7772613fc 100755 --- a/qa/standalone/osd/osd-scrub-repair.sh +++ b/qa/standalone/osd/osd-scrub-repair.sh @@ -83,6 +83,7 @@ function TEST_corrupt_and_repair_replicated() { run_mgr $dir x || return 1 run_osd $dir 0 || return 1 run_osd $dir 1 || return 1 + create_rbd_pool || return 1 wait_for_clean || return 1 add_something $dir $poolname || return 1 @@ -213,6 +214,7 @@ function auto_repair_erasure_coded() { run_osd $dir $id $ceph_osd_args || return 1 fi done + create_rbd_pool || return 1 wait_for_clean || return 1 # Create an EC pool @@ -265,6 +267,7 @@ function corrupt_and_repair_jerasure() { run_osd $dir $id || return 1 fi done + create_rbd_pool || return 1 wait_for_clean || return 1 create_ec_pool $poolname $allow_overwrites k=2 m=2 || return 1 @@ -298,6 +301,7 @@ function corrupt_and_repair_lrc() { run_osd $dir $id || return 1 fi done + create_rbd_pool || return 1 wait_for_clean || return 1 create_ec_pool $poolname $allow_overwrites k=4 m=2 l=3 plugin=lrc || return 1 @@ -332,6 +336,7 @@ function unfound_erasure_coded() { run_osd $dir $id || return 1 fi done + create_rbd_pool || return 1 wait_for_clean || return 1 create_ec_pool $poolname $allow_overwrites k=2 m=2 || return 1 @@ -402,6 +407,7 @@ function list_missing_erasure_coded() { run_osd $dir $id || return 1 fi done + create_rbd_pool || return 1 wait_for_clean || return 1 create_ec_pool $poolname $allow_overwrites k=2 m=1 || return 1 @@ -436,6 +442,7 @@ function list_missing_erasure_coded() { for id in $(seq 0 2) ; do activate_osd $dir $id >&2 || return 1 done + create_rbd_pool || return 1 wait_for_clean || return 1 # Get get - both objects should in the same PG @@ -477,6 +484,7 @@ function TEST_corrupt_scrub_replicated() { run_mgr $dir x || return 1 run_osd $dir 0 || return 1 run_osd $dir 1 || return 1 + create_rbd_pool || return 1 wait_for_clean || return 1 ceph osd pool create $poolname 1 1 || return 1 @@ -1605,6 +1613,7 @@ function corrupt_scrub_erasure() { run_osd $dir $id || return 1 fi done + create_rbd_pool || return 1 wait_for_clean || return 1 create_ec_pool $poolname $allow_overwrites k=2 m=1 stripe_unit=2K --force || return 1 @@ -2535,6 +2544,7 @@ function TEST_periodic_scrub_replicated() { local ceph_osd_args="--osd-scrub-interval-randomize-ratio=0 --osd-deep-scrub-randomize-ratio=0" run_osd $dir 0 $ceph_osd_args || return 1 run_osd $dir 1 $ceph_osd_args || return 1 + create_rbd_pool || return 1 wait_for_clean || return 1 ceph osd pool create $poolname 1 1 || return 1 diff --git a/qa/standalone/osd/osd-scrub-snaps.sh b/qa/standalone/osd/osd-scrub-snaps.sh index 4ddd08eb68df..020363683e94 100755 --- a/qa/standalone/osd/osd-scrub-snaps.sh +++ b/qa/standalone/osd/osd-scrub-snaps.sh @@ -42,6 +42,7 @@ function TEST_scrub_snaps() { run_mgr $dir x || return 1 run_osd $dir 0 || return 1 + create_rbd_pool || return 1 wait_for_clean || return 1 # Create a pool with a single pg @@ -153,6 +154,7 @@ function TEST_scrub_snaps() { rm -f $dir/bad run_osd $dir 0 || return 1 + create_rbd_pool || return 1 wait_for_clean || return 1 local pgid="${poolid}.0" diff --git a/src/ceph-disk/tests/ceph-disk.sh b/src/ceph-disk/tests/ceph-disk.sh index de349f95d27a..511d600941e2 100755 --- a/src/ceph-disk/tests/ceph-disk.sh +++ b/src/ceph-disk/tests/ceph-disk.sh @@ -171,6 +171,7 @@ function test_mark_init() { shift run_mon $dir a + create_rbd_pool local osd_data=$dir/dir $mkdir -p $osd_data @@ -292,6 +293,7 @@ function test_reuse_osd_id() { run_mon $dir a || return 1 run_mgr $dir x || return 1 + create_rbd_pool test_activate $dir $dir/dir1 --osd-uuid $(uuidgen) || return 1 @@ -335,6 +337,7 @@ function test_activate_dir() { run_mon $dir a || return 1 run_mgr $dir x || return 1 + create_rbd_pool $@ test_activate $dir $dir/dir || return 1 @@ -345,6 +348,7 @@ function test_activate_dir_bluestore() { run_mon $dir a || return 1 run_mgr $dir x || return 1 + create_rbd_pool local osd_data=$dir/dir $mkdir -p $osd_data @@ -416,6 +420,7 @@ function test_crush_device_class() { shift run_mon $dir a + create_rbd_pool local osd_data=$dir/dir $mkdir -p $osd_data