X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;ds=sidebyside;f=lustre%2Ftests%2Freplay-dual.sh;h=e101d7cb02c1cf96375b0cb29236b9b3eda63cff;hb=fa507031d245b08c7f24efed32819daf2aa42ab3;hp=8f0cb527ac0a2c9374a1efa51007865edfe47d99;hpb=2deb4f149f4601f9128fd39efd4705573520f277;p=fs%2Flustre-release.git diff --git a/lustre/tests/replay-dual.sh b/lustre/tests/replay-dual.sh index 8f0cb52..e101d7c 100755 --- a/lustre/tests/replay-dual.sh +++ b/lustre/tests/replay-dual.sh @@ -16,13 +16,6 @@ CLEANUP=${CLEANUP:-""} MOUNT_2=${MOUNT_2:-"yes"} . $LUSTRE/tests/test-framework.sh -if [ "$FAILURE_MODE" = "HARD" ] && mixed_ost_devs; then - CONFIG_EXCEPTIONS="17" - echo -n "Several ost services on one ost node are used with FAILURE_MODE=$FAILURE_MODE. " - echo "Except the tests: $CONFIG_EXCEPTIONS" - ALWAYS_EXCEPT="$ALWAYS_EXCEPT $CONFIG_EXCEPTIONS" -fi - init_test_env $@ . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh} init_logging @@ -45,6 +38,39 @@ rm -rf $DIR/[df][0-9]* [ "$DAEMONFILE" ] && $LCTL debug_daemon start $DAEMONFILE $DAEMONSIZE +test_0a() { + touch $MOUNT2/$tfile-A # force sync FLD/SEQ update before barrier + replay_barrier $SINGLEMDS +#define OBD_FAIL_PTLRPC_FINISH_REPLAY | OBD_FAIL_ONCE + touch $MOUNT2/$tfile + createmany -o $MOUNT1/$tfile- 50 + $LCTL set_param fail_loc=0x80000514 + facet_failover $SINGLEMDS + client_up || return 1 + umount -f $MOUNT2 + client_up || return 1 + zconf_mount `hostname` $MOUNT2 || error "mount2 fais" + unlinkmany $MOUNT1/$tfile- 50 || return 2 + rm $MOUNT2/$tfile || return 3 + rm $MOUNT2/$tfile-A || return 4 +} +run_test 0a "expired recovery with lost client" + +test_0b() { + replay_barrier $SINGLEMDS + touch $MOUNT2/$tfile + touch $MOUNT1/$tfile-2 + umount $MOUNT2 + facet_failover $SINGLEMDS + umount -f $MOUNT1 + zconf_mount `hostname` $MOUNT1 || error "mount1 fais" + zconf_mount `hostname` $MOUNT2 || error "mount2 fais" + checkstat $MOUNT1/$tfile-2 && return 1 + checkstat $MOUNT2/$tfile && return 2 + return 0 +} +run_test 0b "lost client during waiting for next transno" + test_1() { touch $MOUNT1/a replay_barrier $SINGLEMDS @@ -253,25 +279,8 @@ test_13() { } run_test 13 "close resend timeout" -test_14a() { - replay_barrier $SINGLEMDS - createmany -o $MOUNT1/$tfile- 25 - createmany -o $MOUNT2/$tfile-2- 1 - createmany -o $MOUNT1/$tfile-3- 25 - umount $MOUNT2 - - facet_failover $SINGLEMDS - # expect failover to fail due to missing client 2 - client_evicted || return 1 - sleep 1 - - # first 25 files should have been replayed - unlinkmany $MOUNT1/$tfile- 25 || return 2 - - zconf_mount `hostname` $MOUNT2 || error "mount $MOUNT2 fail" - return 0 -} -run_test 14a "timeouts waiting for lost client during replay" +# test 14a removed after 18143 because it shouldn't fail anymore and do the same +# as test_15a test_14b() { wait_mds_ost_sync @@ -529,7 +538,7 @@ test_21b() { while true; do test_21b_sub mds$num || break; let n_attempts=n_attempts+1 - [ $n_attemtps -gt 3] && + [ $n_attempts -gt 3 ] && error "The test cannot check whether COS works or not: all renames are replied w/o COS" done restore_lustre_params < $param_file @@ -540,9 +549,9 @@ run_test 21b "commit on sharing, two clients" # end commit on sharing tests -equals_msg `basename $0`: test complete, cleaning up +complete $(basename $0) $SECONDS SLEEP=$((`date +%s` - $NOW)) [ $SLEEP -lt $TIMEOUT ] && sleep $SLEEP [ "$MOUNTED2" = yes ] && zconf_umount $HOSTNAME $MOUNT2 || true check_and_cleanup_lustre -[ -f "$TESTSUITELOG" ] && cat $TESTSUITELOG && grep -q FAIL $TESTSUITELOG && exit 1 || true +exit_status