X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Fost-pools.sh;h=ad56980551a742cfd3199f02879cce556205c8c3;hb=0bafbd7d8f652997d83b3cc2419894f48833f424;hp=ffa15066c0b0542ae0c3582bc964fb697e03348d;hpb=6dd41a43e3cdff1b2e0713cfc163734889d8650a;p=fs%2Flustre-release.git diff --git a/lustre/tests/ost-pools.sh b/lustre/tests/ost-pools.sh index ffa1506..ad56980 100644 --- a/lustre/tests/ost-pools.sh +++ b/lustre/tests/ost-pools.sh @@ -29,7 +29,7 @@ init_logging check_and_setup_lustre -[ "$SLOW" = "no" ] && EXCEPT_SLOW="23b" +[ "$SLOW" = "no" ] && EXCEPT_SLOW="5b 18 22 23b 25" DIR=${DIR:-$MOUNT} assert_DIR @@ -155,15 +155,15 @@ check_file_not_in_pool() { } check_dir_not_in_pool() { - local dir=$1 - local pool=$2 - local res=$($GETSTRIPE -v $dir | grep "^stripe_count" | head -1 | - cut -f 8 -d ' ') - if [[ "$res" == "$pool" ]]; then - error "File $dir is in pool: $res" - return 1 - fi - return 0 + local dir=$1 + local pool=$2 + local res=$($GETSTRIPE -v $dir | grep "^stripe_count" | head -n1 | + cut -f 8 -d ' ') + if [[ "$res" == "$pool" ]]; then + error "File $dir is in pool: $res" + return 1 + fi + return 0 } drain_pool() { @@ -576,18 +576,18 @@ sub_test_5() { destroy_pool $POOL2 } -test_5() { +test_5a() { set_cleanup_trap # Issue commands from client - sub_test_5 $LCTL sub_test_5 $LFS +} +run_test 5a "lfs pool_list from client" - # Issue commands from MDS +test_5b() { + set_cleanup_trap sub_test_5 "do_facet $SINGLEMDS lctl" - sub_test_5 "do_facet $SINGLEMDS lfs" - } -run_test 5 "lfs/lctl pool_list" +run_test 5b "lctl pool_list from MDS" test_6() { set_cleanup_trap @@ -998,17 +998,17 @@ test_18() { # is / should be max=30 diff=$((($files1 - $files2) * 100 / $files1)) - echo "No pool / wide pool: $diff %." - [ $diff -gt $max ] && - error_ignore 23408 "Degradation with wide pool is $diff% > $max%" + echo "No pool / wide pool: $diff %." + [ $diff -gt $max ] && + error_ignore bz23408 "Degradation with wide pool is $diff% > $max%" - max=30 - diff=$((($files1 - $files3) * 100 / $files1)) - echo "No pool / missing pool: $diff %." - [ $diff -gt $max ] && - error_ignore 23408 "Degradation with wide pool is $diff% > $max%" + max=30 + diff=$((($files1 - $files3) * 100 / $files1)) + echo "No pool / missing pool: $diff %." + [ $diff -gt $max ] && + error_ignore bz23408 "Degradation with wide pool is $diff% > $max%" - return 0 + return 0 } run_test 18 "File create in a directory which references a deleted pool" @@ -1388,7 +1388,6 @@ run_test 24 "Independence of pool from other setstripe parameters" test_25() { set_cleanup_trap - local dev=$(mdsdevname ${SINGLEMDS//mds/}) local POOL_ROOT=${POOL_ROOT:-$DIR/$tdir} mkdir -p $POOL_ROOT @@ -1400,11 +1399,9 @@ test_25() { sort -u | tr '\n' ' ' " "$FSNAME-OST0000_UUID " >/dev/null || error "pool_add failed: $1; $2" - stop $SINGLEMDS || return 1 - start $SINGLEMDS ${dev} $MDS_MOUNT_OPTS || - { error "Failed to start $SINGLEMDS after stopping" && break; } - wait_osc_import_state mds ost FULL - clients_up + facet_failover $SINGLEMDS || error "failed to failover $SINGLEMDS" + wait_osc_import_state $SINGLEMDS ost FULL + clients_up wait_mds_ost_sync # Veriy that the pool got created and is usable