#!/usr/bin/env bash set -x die() { echo "$@" exit 1 } usage() { cat < /dev/null 2>&1 || true $RADOS_TOOL -p $POOL_EC rm $OBJ > /dev/null 2>&1 || true } test_omap() { cleanup for i in $(seq 1 1 10) do if [ $(($i % 2)) -eq 0 ]; then $RADOS_TOOL -p $POOL setomapval $OBJ $i $i else echo -n "$i" | $RADOS_TOOL -p $POOL setomapval $OBJ $i fi $RADOS_TOOL -p $POOL getomapval $OBJ $i | grep -q "|$i|\$" done $RADOS_TOOL -p $POOL listomapvals $OBJ | grep -c value | grep 10 for i in $(seq 1 1 5) do $RADOS_TOOL -p $POOL rmomapkey $OBJ $i done $RADOS_TOOL -p $POOL listomapvals $OBJ | grep -c value | grep 5 $RADOS_TOOL -p $POOL clearomap $OBJ $RADOS_TOOL -p $POOL listomapvals $OBJ | wc -l | grep 0 cleanup for i in $(seq 1 1 10) do dd if=/dev/urandom bs=128 count=1 > $TDIR/omap_key if [ $(($i % 2)) -eq 0 ]; then $RADOS_TOOL -p $POOL --omap-key-file $TDIR/omap_key setomapval $OBJ $i else echo -n "$i" | $RADOS_TOOL -p $POOL --omap-key-file $TDIR/omap_key setomapval $OBJ fi $RADOS_TOOL -p $POOL --omap-key-file $TDIR/omap_key getomapval $OBJ | grep -q "|$i|\$" $RADOS_TOOL -p $POOL --omap-key-file $TDIR/omap_key rmomapkey $OBJ $RADOS_TOOL -p $POOL listomapvals $OBJ | grep -c value | grep 0 done cleanup } test_xattr() { cleanup $RADOS_TOOL -p $POOL put $OBJ /etc/passwd V1=`mktemp fooattrXXXXXXX` V2=`mktemp fooattrXXXXXXX` echo -n fooval > $V1 expect_false $RADOS_TOOL -p $POOL setxattr $OBJ 2>/dev/null expect_false $RADOS_TOOL -p $POOL setxattr $OBJ foo fooval extraarg 2>/dev/null $RADOS_TOOL -p $POOL setxattr $OBJ foo fooval $RADOS_TOOL -p $POOL getxattr $OBJ foo > $V2 cmp $V1 $V2 cat $V1 | $RADOS_TOOL -p $POOL setxattr $OBJ bar $RADOS_TOOL -p $POOL getxattr $OBJ bar > $V2 cmp $V1 $V2 $RADOS_TOOL -p $POOL listxattr $OBJ > $V1 grep -q foo $V1 grep -q bar $V1 [ `cat $V1 | wc -l` -eq 2 ] rm $V1 $V2 cleanup } test_rmobj() { p=`uuidgen` $CEPH_TOOL osd pool create $p 1 $CEPH_TOOL osd pool set-quota $p max_objects 1 V1=`mktemp fooattrXXXXXXX` $RADOS_TOOL put $OBJ $V1 -p $p while ! $CEPH_TOOL osd dump | grep 'full_quota max_objects' do sleep 2 done $RADOS_TOOL -p $p rm $OBJ --force-full $CEPH_TOOL osd pool rm $p $p --yes-i-really-really-mean-it rm $V1 } test_ls() { echo "Testing rados ls command" p=`uuidgen` $CEPH_TOOL osd pool create $p 1 NS=10 OBJS=20 # Include default namespace (0) in the total TOTAL=$(expr $OBJS \* $(expr $NS + 1)) for nsnum in `seq 0 $NS` do for onum in `seq 1 $OBJS` do if [ "$nsnum" = "0" ]; then "$RADOS_TOOL" -p $p put obj${onum} /etc/fstab 2> /dev/null else "$RADOS_TOOL" -p $p -N "NS${nsnum}" put obj${onum} /etc/fstab 2> /dev/null fi done done CHECK=$("$RADOS_TOOL" -p $p ls 2> /dev/null | wc -l) if [ "$OBJS" -ne "$CHECK" ]; then die "Created $OBJS objects in default namespace but saw $CHECK" fi TESTNS=NS${NS} CHECK=$("$RADOS_TOOL" -p $p -N $TESTNS ls 2> /dev/null | wc -l) if [ "$OBJS" -ne "$CHECK" ]; then die "Created $OBJS objects in $TESTNS namespace but saw $CHECK" fi CHECK=$("$RADOS_TOOL" -p $p --all ls 2> /dev/null | wc -l) if [ "$TOTAL" -ne "$CHECK" ]; then die "Created $TOTAL objects but saw $CHECK" fi $CEPH_TOOL osd pool rm $p $p --yes-i-really-really-mean-it } test_cleanup() { echo "Testing rados cleanup command" p=`uuidgen` $CEPH_TOOL osd pool create $p 1 NS=5 OBJS=4 # Include default namespace (0) in the total TOTAL=$(expr $OBJS \* $(expr $NS + 1)) for nsnum in `seq 0 $NS` do for onum in `seq 1 $OBJS` do if [ "$nsnum" = "0" ]; then "$RADOS_TOOL" -p $p put obj${onum} /etc/fstab 2> /dev/null else "$RADOS_TOOL" -p $p -N "NS${nsnum}" put obj${onum} /etc/fstab 2> /dev/null fi done done $RADOS_TOOL -p $p --all ls > $TDIR/before.ls.out 2> /dev/null $RADOS_TOOL -p $p bench 3 write --no-cleanup 2> /dev/null $RADOS_TOOL -p $p -N NS1 bench 3 write --no-cleanup 2> /dev/null $RADOS_TOOL -p $p -N NS2 bench 3 write --no-cleanup 2> /dev/null $RADOS_TOOL -p $p -N NS3 bench 3 write --no-cleanup 2> /dev/null # Leave dangling objects without a benchmark_last_metadata in NS4 expect_false timeout 3 $RADOS_TOOL -p $p -N NS4 bench 30 write --no-cleanup 2> /dev/null $RADOS_TOOL -p $p -N NS5 bench 3 write --no-cleanup 2> /dev/null $RADOS_TOOL -p $p -N NS3 cleanup 2> /dev/null #echo "Check NS3 after specific cleanup" CHECK=$($RADOS_TOOL -p $p -N NS3 ls | wc -l) if [ "$OBJS" -ne "$CHECK" ] ; then die "Expected $OBJS objects in NS3 but saw $CHECK" fi #echo "Try to cleanup all" $RADOS_TOOL -p $p --all cleanup #echo "Check all namespaces" $RADOS_TOOL -p $p --all ls > $TDIR/after.ls.out 2> /dev/null CHECK=$(cat $TDIR/after.ls.out | wc -l) if [ "$TOTAL" -ne "$CHECK" ]; then die "Expected $TOTAL objects but saw $CHECK" fi if ! diff $TDIR/before.ls.out $TDIR/after.ls.out then die "Different objects found after cleanup" fi set +e run_expect_fail $RADOS_TOOL -p $p cleanup --prefix illegal_prefix run_expect_succ $RADOS_TOOL -p $p cleanup --prefix benchmark_data_otherhost set -e $CEPH_TOOL osd pool rm $p $p --yes-i-really-really-mean-it } function test_append() { cleanup # create object touch ./rados_append_null $RADOS_TOOL -p $POOL append $OBJ ./rados_append_null $RADOS_TOOL -p $POOL get $OBJ ./rados_append_0_out cmp ./rados_append_null ./rados_append_0_out # append 4k, total size 4k dd if=/dev/zero of=./rados_append_4k bs=4k count=1 $RADOS_TOOL -p $POOL append $OBJ ./rados_append_4k $RADOS_TOOL -p $POOL get $OBJ ./rados_append_4k_out cmp ./rados_append_4k ./rados_append_4k_out # append 4k, total size 8k $RADOS_TOOL -p $POOL append $OBJ ./rados_append_4k $RADOS_TOOL -p $POOL get $OBJ ./rados_append_4k_out read_size=`ls -l ./rados_append_4k_out | awk -F ' ' '{print $5}'` if [ 8192 -ne $read_size ]; then die "Append failed expecting 8192 read $read_size" fi # append 10M, total size 10493952 dd if=/dev/zero of=./rados_append_10m bs=10M count=1 $RADOS_TOOL -p $POOL append $OBJ ./rados_append_10m $RADOS_TOOL -p $POOL get $OBJ ./rados_append_10m_out read_size=`ls -l ./rados_append_10m_out | awk -F ' ' '{print $5}'` if [ 10493952 -ne $read_size ]; then die "Append failed expecting 10493952 read $read_size" fi # cleanup cleanup # create object $RADOS_TOOL -p $POOL_EC append $OBJ ./rados_append_null $RADOS_TOOL -p $POOL_EC get $OBJ ./rados_append_0_out cmp rados_append_null rados_append_0_out # append 4k, total size 4k $RADOS_TOOL -p $POOL_EC append $OBJ ./rados_append_4k $RADOS_TOOL -p $POOL_EC get $OBJ ./rados_append_4k_out cmp rados_append_4k rados_append_4k_out # append 4k, total size 8k $RADOS_TOOL -p $POOL_EC append $OBJ ./rados_append_4k $RADOS_TOOL -p $POOL_EC get $OBJ ./rados_append_4k_out read_size=`ls -l ./rados_append_4k_out | awk -F ' ' '{print $5}'` if [ 8192 -ne $read_size ]; then die "Append failed expecting 8192 read $read_size" fi # append 10M, total size 10493952 $RADOS_TOOL -p $POOL_EC append $OBJ ./rados_append_10m $RADOS_TOOL -p $POOL_EC get $OBJ ./rados_append_10m_out read_size=`ls -l ./rados_append_10m_out | awk -F ' ' '{print $5}'` if [ 10493952 -ne $read_size ]; then die "Append failed expecting 10493952 read $read_size" fi cleanup rm -rf ./rados_append_null ./rados_append_0_out rm -rf ./rados_append_4k ./rados_append_4k_out ./rados_append_10m ./rados_append_10m_out } function test_put() { # rados put test: cleanup # create file in local fs dd if=/dev/urandom of=rados_object_10k bs=1K count=10 # test put command $RADOS_TOOL -p $POOL put $OBJ ./rados_object_10k $RADOS_TOOL -p $POOL get $OBJ ./rados_object_10k_out cmp ./rados_object_10k ./rados_object_10k_out cleanup # test put command with offset 0 $RADOS_TOOL -p $POOL put $OBJ ./rados_object_10k --offset 0 $RADOS_TOOL -p $POOL get $OBJ ./rados_object_offset_0_out cmp ./rados_object_10k ./rados_object_offset_0_out cleanup # test put command with offset 1000 $RADOS_TOOL -p $POOL put $OBJ ./rados_object_10k --offset 1000 $RADOS_TOOL -p $POOL get $OBJ ./rados_object_offset_1000_out cmp ./rados_object_10k ./rados_object_offset_1000_out 0 1000 cleanup rm -rf ./rados_object_10k ./rados_object_10k_out ./rados_object_offset_0_out ./rados_object_offset_1000_out } function test_stat() { bluestore=$("$CEPH_TOOL" osd metadata | grep '"osd_objectstore": "bluestore"' | cut -f1) # create file in local fs dd if=/dev/urandom of=rados_object_128k bs=64K count=2 # rados df test (replicated_pool): $RADOS_TOOL purge $POOL --yes-i-really-really-mean-it $CEPH_TOOL osd pool rm $POOL $POOL --yes-i-really-really-mean-it $CEPH_TOOL osd pool create $POOL 8 $CEPH_TOOL osd pool set $POOL size 3 # put object with 1 MB gap in front $RADOS_TOOL -p $POOL put $OBJ ./rados_object_128k --offset=1048576 MATCH_CNT=0 if [ "" == "$bluestore" ]; then STORED=1.1 STORED_UNIT="MiB" else STORED=384 STORED_UNIT="KiB" fi for i in {1..60} do IN=$($RADOS_TOOL -p $POOL df | grep $POOL ; [[ ! -z $? ]] && echo "") [[ -z $IN ]] && sleep 1 && continue IFS=' ' read -ra VALS <<< "$IN" # verification is a bit tricky due to stats report's eventual model # VALS[1] - STORED # VALS[2] - STORED units # VALS[3] - OBJECTS # VALS[5] - COPIES # VALS[12] - WR_OPS # VALS[13] - WR # VALS[14] - WR uints # implies replication factor 3 if [ ${VALS[1]} == $STORED ] && [ ${VALS[2]} == $STORED_UNIT ] && [ ${VALS[3]} == "1" ] && [ ${VALS[5]} == "3" ] && [ ${VALS[12]} == "1" ] && [ ${VALS[13]} == 128 ] && [ ${VALS[14]} == "KiB" ] then # enforce multiple match to make sure stats aren't changing any more MATCH_CNT=$((MATCH_CNT+1)) [[ $MATCH_CNT == 3 ]] && break sleep 1 continue fi MATCH_CNT=0 sleep 1 continue done [[ -z $IN ]] && die "Failed to retrieve any pool stats within 60 seconds" if [ ${VALS[1]} != $STORED ] || [ ${VALS[2]} != $STORED_UNIT ] || [ ${VALS[3]} != "1" ] || [ ${VALS[5]} != "3" ] || [ ${VALS[12]} != "1" ] || [ ${VALS[13]} != 128 ] || [ ${VALS[14]} != "KiB" ] then die "Failed to retrieve proper pool stats within 60 seconds" fi # overwrite data at 1MB offset $RADOS_TOOL -p $POOL put $OBJ ./rados_object_128k --offset=1048576 MATCH_CNT=0 if [ "" == "$bluestore" ]; then STORED=1.1 STORED_UNIT="MiB" else STORED=384 STORED_UNIT="KiB" fi for i in {1..60} do IN=$($RADOS_TOOL -p $POOL df | grep $POOL ; [[ ! -z $? ]] && echo "") IFS=' ' read -ra VALS <<< "$IN" # verification is a bit tricky due to stats report's eventual model # VALS[1] - STORED # VALS[2] - STORED units # VALS[3] - OBJECTS # VALS[5] - COPIES # VALS[12] - WR_OPS # VALS[13] - WR # VALS[14] - WR uints # implies replication factor 3 if [ ${VALS[1]} == $STORED ] && [ ${VALS[2]} == $STORED_UNIT ] && [ ${VALS[3]} == "1" ] && [ ${VALS[5]} == "3" ] && [ ${VALS[12]} == "2" ] && [ ${VALS[13]} == 256 ] && [ ${VALS[14]} == "KiB" ] then # enforce multiple match to make sure stats aren't changing any more MATCH_CNT=$((MATCH_CNT+1)) [[ $MATCH_CNT == 3 ]] && break sleep 1 continue fi MATCH_CNT=0 sleep 1 continue done if [ ${VALS[1]} != $STORED ] || [ ${VALS[2]} != $STORED_UNIT ] || [ ${VALS[3]} != "1" ] || [ ${VALS[5]} != "3" ] || [ ${VALS[12]} != "2" ] || [ ${VALS[13]} != 256 ] || [ ${VALS[14]} != "KiB" ] then die "Failed to retrieve proper pool stats within 60 seconds" fi # write data at 64K offset $RADOS_TOOL -p $POOL put $OBJ ./rados_object_128k --offset=65536 MATCH_CNT=0 if [ "" == "$bluestore" ]; then STORED=1.1 STORED_UNIT="MiB" else STORED=768 STORED_UNIT="KiB" fi for i in {1..60} do IN=$($RADOS_TOOL -p $POOL df | grep $POOL ; [[ ! -z $? ]] && echo "") IFS=' ' read -ra VALS <<< "$IN" # verification is a bit tricky due to stats report's eventual model # VALS[1] - STORED # VALS[2] - STORED units # VALS[3] - OBJECTS # VALS[5] - COPIES # VALS[12] - WR_OPS # VALS[13] - WR # VALS[14] - WR uints # implies replication factor 3 if [ ${VALS[1]} == $STORED ] && [ ${VALS[2]} == $STORED_UNIT ] && [ ${VALS[3]} == "1" ] && [ ${VALS[5]} == "3" ] && [ ${VALS[12]} == "3" ] && [ ${VALS[13]} == 384 ] && [ ${VALS[14]} == "KiB" ] then # enforce multiple match to make sure stats aren't changing any more MATCH_CNT=$((MATCH_CNT+1)) [[ $MATCH_CNT == 3 ]] && break sleep 1 continue fi MATCH_CNT=0 sleep 1 continue done if [ ${VALS[1]} != $STORED ] || [ ${VALS[2]} != $STORED_UNIT ] || [ ${VALS[3]} != "1" ] || [ ${VALS[5]} != "3" ] || [ ${VALS[12]} != "3" ] || [ ${VALS[13]} != 384 ] || [ ${VALS[14]} != "KiB" ] then die "Failed to retrieve proper pool stats within 60 seconds" fi # overwrite object totally $RADOS_TOOL -p $POOL put $OBJ ./rados_object_128k MATCH_CNT=0 if [ "" == "$bluestore" ]; then STORED=128 STORED_UNIT="KiB" else STORED=384 STORED_UNIT="KiB" fi for i in {1..60} do IN=$($RADOS_TOOL -p $POOL df | grep $POOL ; [[ ! -z $? ]] && echo "") IFS=' ' read -ra VALS <<< "$IN" # verification is a bit tricky due to stats report's eventual model # VALS[1] - STORED # VALS[2] - STORED units # VALS[3] - OBJECTS # VALS[5] - COPIES # VALS[12] - WR_OPS # VALS[13] - WR # VALS[14] - WR uints # implies replication factor 3 if [ ${VALS[1]} == $STORED ] && [ ${VALS[2]} == $STORED_UNIT ] && [ ${VALS[3]} == "1" ] && [ ${VALS[5]} == "3" ] && [ ${VALS[12]} == "4" ] && [ ${VALS[13]} == 512 ] && [ ${VALS[14]} == "KiB" ] then # enforce multiple match to make sure stats aren't changing any more MATCH_CNT=$((MATCH_CNT+1)) [[ $MATCH_CNT == 3 ]] && break sleep 1 continue fi MATCH_CNT=0 sleep 1 continue done if [ ${VALS[1]} != $STORED ] || [ ${VALS[2]} != $STORED_UNIT ] || [ ${VALS[3]} != "1" ] || [ ${VALS[5]} != "3" ] || [ ${VALS[12]} != "4" ] || [ ${VALS[13]} != 512 ] || [ ${VALS[14]} != "KiB" ] then die "Failed to retrieve proper pool stats within 60 seconds" fi cleanup # after cleanup? MATCH_CNT=0 for i in {1..60} do IN=$($RADOS_TOOL -p $POOL df | grep $POOL ; [[ ! -z $? ]] && echo "") IFS=' ' read -ra VALS <<< "$IN" # verification is a bit tricky due to stats report's eventual model # VALS[1] - STORED # VALS[2] - STORED units # VALS[3] - OBJECTS # VALS[5] - COPIES # VALS[12] - WR_OPS # VALS[13] - WR # VALS[14] - WR uints # implies replication factor 3 if [ ${VALS[1]} == 0 ] && [ ${VALS[2]} == "B" ] && [ ${VALS[3]} == "0" ] && [ ${VALS[5]} == "0" ] && [ ${VALS[12]} == "5" ] && [ ${VALS[13]} == 512 ] && [ ${VALS[14]} == "KiB" ] then # enforce multiple match to make sure stats aren't changing any more MATCH_CNT=$((MATCH_CNT+1)) [[ $MATCH_CNT == 3 ]] && break sleep 1 continue fi MATCH_CNT=0 sleep 1 continue done if [ ${VALS[1]} != 0 ] || [ ${VALS[2]} != "B" ] || [ ${VALS[3]} != "0" ] || [ ${VALS[5]} != "0" ] || [ ${VALS[12]} != "5" ] || [ ${VALS[13]} != 512 ] || [ ${VALS[14]} != "KiB" ] then die "Failed to retrieve proper pool stats within 60 seconds" fi ############ rados df test (EC pool): ############## $RADOS_TOOL purge $POOL_EC --yes-i-really-really-mean-it $CEPH_TOOL osd pool rm $POOL_EC $POOL_EC --yes-i-really-really-mean-it $CEPH_TOOL osd erasure-code-profile set myprofile k=2 m=1 stripe_unit=2K crush-failure-domain=osd --force $CEPH_TOOL osd pool create $POOL_EC 8 8 erasure # put object $RADOS_TOOL -p $POOL_EC put $OBJ ./rados_object_128k MATCH_CNT=0 if [ "" == "$bluestore" ]; then STORED=128 STORED_UNIT="KiB" else STORED=192 STORED_UNIT="KiB" fi for i in {1..60} do IN=$($RADOS_TOOL -p $POOL_EC df | grep $POOL_EC ; [[ ! -z $? ]] && echo "") [[ -z $IN ]] && sleep 1 && continue IFS=' ' read -ra VALS <<< "$IN" # verification is a bit tricky due to stats report's eventual model # VALS[1] - STORED # VALS[2] - STORED units # VALS[3] - OBJECTS # VALS[5] - COPIES # VALS[12] - WR_OPS # VALS[13] - WR # VALS[14] - WR uints # implies replication factor 2+1 if [ ${VALS[1]} == $STORED ] && [ ${VALS[2]} == $STORED_UNIT ] && [ ${VALS[3]} == "1" ] && [ ${VALS[5]} == "3" ] && [ ${VALS[12]} == "1" ] && [ ${VALS[13]} == 128 ] && [ ${VALS[14]} == "KiB" ] then # enforce multiple match to make sure stats aren't changing any more MATCH_CNT=$((MATCH_CNT+1)) [[ $MATCH_CNT == 3 ]] && break sleep 1 continue fi MATCH_CNT=0 sleep 1 continue done [[ -z $IN ]] && die "Failed to retrieve any pool stats within 60 seconds" if [ ${VALS[1]} != $STORED ] || [ ${VALS[2]} != $STORED_UNIT ] || [ ${VALS[3]} != "1" ] || [ ${VALS[5]} != "3" ] || [ ${VALS[12]} != "1" ] || [ ${VALS[13]} != 128 ] || [ ${VALS[14]} != "KiB" ] then die "Failed to retrieve proper pool stats within 60 seconds" fi # overwrite object $RADOS_TOOL -p $POOL_EC put $OBJ ./rados_object_128k MATCH_CNT=0 if [ "" == "$bluestore" ]; then STORED=128 STORED_UNIT="KiB" else STORED=192 STORED_UNIT="KiB" fi for i in {1..60} do IN=$($RADOS_TOOL -p $POOL_EC df | grep $POOL_EC ; [[ ! -z $? ]] && echo "") IFS=' ' read -ra VALS <<< "$IN" # verification is a bit tricky due to stats report's eventual model # VALS[1] - STORED # VALS[2] - STORED units # VALS[3] - OBJECTS # VALS[5] - COPIES # VALS[12] - WR_OPS # VALS[13] - WR # VALS[14] - WR uints # implies replication factor 2+1 if [ ${VALS[1]} == $STORED ] && [ ${VALS[2]} == $STORED_UNIT ] && [ ${VALS[3]} == "1" ] && [ ${VALS[5]} == "3" ] && [ ${VALS[12]} == "2" ] && [ ${VALS[13]} == 256 ] && [ ${VALS[14]} == "KiB" ] then # enforce multiple match to make sure stats aren't changing any more MATCH_CNT=$((MATCH_CNT+1)) [[ $MATCH_CNT == 3 ]] && break sleep 1 continue fi MATCH_CNT=0 sleep 1 continue done if [ ${VALS[1]} != $STORED ] || [ ${VALS[2]} != $STORED_UNIT ] || [ ${VALS[3]} != "1" ] || [ ${VALS[5]} != "3" ] || [ ${VALS[12]} != "2" ] || [ ${VALS[13]} != 256 ] || [ ${VALS[14]} != "KiB" ] then die "Failed to retrieve proper pool stats within 60 seconds" fi cleanup # after cleanup? MATCH_CNT=0 for i in {1..60} do IN=$($RADOS_TOOL -p $POOL_EC df | grep $POOL_EC ; [[ ! -z $? ]] && echo "") IFS=' ' read -ra VALS <<< "$IN" # verification is a bit tricky due to stats report's eventual model # VALS[1] - STORED # VALS[2] - STORED units # VALS[3] - OBJECTS # VALS[5] - COPIES # VALS[12] - WR_OPS # VALS[13] - WR # VALS[14] - WR uints # implies replication factor 2+1 if [ ${VALS[1]} == 0 ] && [ ${VALS[2]} == "B" ] && [ ${VALS[3]} == "0" ] && [ ${VALS[5]} == "0" ] && [ ${VALS[12]} == "3" ] && [ ${VALS[13]} == 256 ] && [ ${VALS[14]} == "KiB" ] then # enforce multiple match to make sure stats aren't changing any more MATCH_CNT=$((MATCH_CNT+1)) [[ $MATCH_CNT == 3 ]] && break sleep 1 continue fi MATCH_CNT=0 sleep 1 continue done if [ ${VALS[1]} != 0 ] || [ ${VALS[2]} != "B" ] || [ ${VALS[3]} != "0" ] || [ ${VALS[5]} != "0" ] || [ ${VALS[12]} != "3" ] || [ ${VALS[13]} != 256 ] || [ ${VALS[14]} != "KiB" ] then die "Failed to retrieve proper pool stats within 60 seconds" fi rm -rf ./rados_object_128k } test_xattr test_omap test_rmobj test_ls test_cleanup test_append test_put test_stat # clean up environment, delete pool $CEPH_TOOL osd pool delete $POOL $POOL --yes-i-really-really-mean-it $CEPH_TOOL osd pool delete $POOL_EC $POOL_EC --yes-i-really-really-mean-it $CEPH_TOOL osd pool delete $POOL_CP_TARGET $POOL_CP_TARGET --yes-i-really-really-mean-it echo "SUCCESS!" exit 0