X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Freplay-dual.sh;h=49cad57938bab04db4f6e48f4c313825237d90e1;hb=ab395180421efbbb579db676b89e83b4c3db5219;hp=bc55eaf8576bc6644f04f032914baa68187de835;hpb=4b6f6519c86355f8ac9899a06e2510348a0f9413;p=fs%2Flustre-release.git diff --git a/lustre/tests/replay-dual.sh b/lustre/tests/replay-dual.sh index bc55eaf..49cad57 100755 --- a/lustre/tests/replay-dual.sh +++ b/lustre/tests/replay-dual.sh @@ -2,12 +2,12 @@ set -e -# bug number: 13129 13129 6088 10124 -ALWAYS_EXCEPT="2 3 8 15c $REPLAY_DUAL_EXCEPT" +# bug number: 13129 13129 10124 +ALWAYS_EXCEPT="2 3 15c $REPLAY_DUAL_EXCEPT" SAVE_PWD=$PWD PTLDEBUG=${PTLDEBUG:--1} -LUSTRE=${LUSTRE:-`dirname $0`/..} +LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)} SETUP=${SETUP:-""} CLEANUP=${CLEANUP:-""} MOUNT_2=${MOUNT_2:-"yes"} @@ -23,6 +23,7 @@ init_test_env $@ build_test_filter cleanup_and_setup_lustre +assert_DIR rm -rf $DIR/[df][0-9]* [ "$DAEMONFILE" ] && $LCTL debug_daemon start $DAEMONFILE $DAEMONSIZE @@ -141,9 +142,9 @@ test_9() { mcreate $MOUNT1/$tfile-1 mcreate $MOUNT2/$tfile-2 # drop first reint reply - do_facet $SINGLEMDS sysctl -w lustre.fail_loc=0x80000119 + do_facet $SINGLEMDS lctl set_param fail_loc=0x80000119 fail $SINGLEMDS - do_facet $SINGLEMDS sysctl -w lustre.fail_loc=0 + do_facet $SINGLEMDS lctl set_param fail_loc=0 rm $MOUNT1/$tfile-[1,2] || return 1 @@ -157,9 +158,9 @@ test_10() { munlink $MOUNT1/$tfile-1 mcreate $MOUNT2/$tfile-2 # drop first reint reply - do_facet $SINGLEMDS sysctl -w lustre.fail_loc=0x80000119 + do_facet $SINGLEMDS lctl set_param fail_loc=0x80000119 fail $SINGLEMDS - do_facet $SINGLEMDS sysctl -w lustre.fail_loc=0 + do_facet $SINGLEMDS lctl set_param fail_loc=0 checkstat $MOUNT1/$tfile-1 && return 1 checkstat $MOUNT1/$tfile-2 || return 2 @@ -177,12 +178,12 @@ test_11() { mcreate $MOUNT2/$tfile-4 mcreate $MOUNT1/$tfile-5 # drop all reint replies for a while - do_facet $SINGLEMDS sysctl -w lustre.fail_loc=0x0119 + do_facet $SINGLEMDS lctl set_param fail_loc=0x0119 # note that with this fail_loc set, facet_failover df will fail facet_failover $SINGLEMDS #sleep for while, let both clients reconnect and timeout sleep $((TIMEOUT * 2)) - do_facet $SINGLEMDS sysctl -w lustre.fail_loc=0 + do_facet $SINGLEMDS lctl set_param fail_loc=0 rm $MOUNT1/$tfile-[1-5] || return 1 @@ -197,9 +198,9 @@ test_12() { MULTIPID=$! #define OBD_FAIL_LDLM_ENQUEUE 0x302 - do_facet $SINGLEMDS sysctl -w lustre.fail_loc=0x80000302 + do_facet $SINGLEMDS lctl set_param fail_loc=0x80000302 facet_failover $SINGLEMDS - do_facet $SINGLEMDS sysctl -w lustre.fail_loc=0 + do_facet $SINGLEMDS lctl set_param fail_loc=0 df $MOUNT || return 1 ls $DIR/$tfile @@ -222,9 +223,9 @@ test_13() { wait $MULTIPID || return 4 # drop close - do_facet $SINGLEMDS sysctl -w lustre.fail_loc=0x80000115 + do_facet $SINGLEMDS lctl set_param fail_loc=0x80000115 facet_failover $SINGLEMDS - do_facet $SINGLEMDS sysctl -w lustre.fail_loc=0 + do_facet $SINGLEMDS lctl set_param fail_loc=0 df $MOUNT || return 1 ls $DIR/$tfile @@ -255,7 +256,7 @@ test_14() { } run_test 14 "timeouts waiting for lost client during replay" -test_15() { +test_15a() { # was test_15 replay_barrier $SINGLEMDS createmany -o $MOUNT1/$tfile- 25 createmany -o $MOUNT2/$tfile-2- 1 @@ -270,72 +271,7 @@ test_15() { zconf_mount `hostname` $MOUNT2 || error "mount $MOUNT2 fail" return 0 } -run_test 15 "timeout waiting for lost client during replay, 1 client completes" - -test_15a() { - local ost_last_id="" - local osc_last_id="" - - replay_barrier $SINGLEMDS - echo "data" > "$MOUNT2/${tfile}-m2" - - umount $MOUNT2 - facet_failover $SINGLEMDS - df $MOUNT || return 1 - - ost_last_id=`cat /proc/fs/lustre/obdfilter/*/last_id` - mds_last_id=`cat /proc/fs/lustre/osc/*mds*/last_id` - - echo "Ids after MDS<->OST synchonizing" - echo "--------------------------------" - echo "MDS last_id:" - echo $mds_last_id - echo "OST last_id:" - echo $ost_last_id - - local i=0 - echo $ost_last_id | while read id; do - ost_ids[$i]=$id - ((i++)) - done - - i=0 - echo $mds_last_id | while read id; do - mds_ids[$i]=$id - ((i++)) - done - - local arr_len=${#mds_ids[*]} - for ((i=0;i<$arr_len;i++)); do - mds_id=${mds_ids[i]} - ost_id=${ost_ids[i]} - - test $mds_id -ge $ost_id || { - echo "MDS last id ($mds_id) is smaller than OST one ($ost_id)" - return 2 - } - done - - zconf_mount `hostname` $MOUNT2 || error "mount $MOUNT2 fail" - return 0 -} -#CROW run_test 15a "OST clear orphans - synchronize ids on MDS and OST" - -test_15b() { - replay_barrier $SINGLEMDS - echo "data" > "$MOUNT2/${tfile}-m2" - umount $MOUNT2 - - do_facet ost1 "sysctl -w lustre.fail_loc=0x80000802" - facet_failover $SINGLEMDS - - df $MOUNT || return 1 - do_facet ost1 "sysctl -w lustre.fail_loc=0" - - zconf_mount `hostname` $MOUNT2 || error "mount $MOUNT2 fail" - return 0 -} -#CROW run_test 15b "multiple delayed OST clear orphans" +run_test 15a "timeout waiting for lost client during replay, 1 client completes" test_15c() { replay_barrier $SINGLEMDS @@ -404,18 +340,18 @@ test_18() { # bug 3822 - evicting client with enqueued lock statmany -s $MOUNT1/$tdir/f 1 500 & OPENPID=$! NOW=`date +%s` - do_facet $SINGLEMDS sysctl -w lustre.fail_loc=0x8000030b # hold enqueue + do_facet $SINGLEMDS lctl set_param fail_loc=0x8000030b # hold enqueue sleep 1 #define OBD_FAIL_LDLM_BL_CALLBACK 0x305 - do_facet client sysctl -w lustre.fail_loc=0x80000305 # drop cb, evict + do_facet client lctl set_param fail_loc=0x80000305 # drop cb, evict cancel_lru_locks mdc usleep 500 # wait to ensure first client is one that will be evicted openfile -f O_RDONLY $MOUNT2/$tdir/f0 wait $OPENPID dmesg | grep "entering recovery in server" && \ error "client not evicted" || true - do_facet client "sysctl -w lustre.fail_loc=0" - do_facet $SINGLEMDS "sysctl -w lustre.fail_loc=0" + do_facet client "lctl set_param fail_loc=0" + do_facet $SINGLEMDS "lctl set_param fail_loc=0" } run_test 18 "ldlm_handle_enqueue succeeds on evicted export (3822)"