Whamcloud - gitweb
LU-2628 tests: disable test_40 of replay-single
authorJinshan Xiong <jinshan.xiong@intel.com>
Thu, 17 Jan 2013 23:11:37 +0000 (15:11 -0800)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 8 Mar 2013 05:39:13 +0000 (00:39 -0500)
This test case assumes that IO to OSTs could go on even when the
connect to MDT is lost, this is not true any more because clients
have to verify the layout is correct before operating OST objects.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I08eaad7b97da7ee152c066426f24bc1d15db5738
Reviewed-on: http://review.whamcloud.com/5056
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
lustre/tests/replay-single.sh

index 3a6299c..8816fab 100755 (executable)
@@ -796,36 +796,40 @@ count_ost_writes() {
 
 #b=2477,2532
 test_40(){
 
 #b=2477,2532
 test_40(){
-    $LCTL mark multiop $MOUNT/$tfile OS_c
-    multiop $MOUNT/$tfile OS_c  &
-    PID=$!
-    writeme -s $MOUNT/${tfile}-2 &
-    WRITE_PID=$!
-    sleep 1
-    facet_failover $SINGLEMDS
+       # always need connection to MDS to verify layout during IO. LU-2628.
+       lctl get_param mdc.*.connect_flags | grep -q layout_lock &&
+               skip "layout_lock needs MDS connection for IO" && return 0
+
+       $LCTL mark multiop $MOUNT/$tfile OS_c
+       multiop $MOUNT/$tfile OS_c  &
+       PID=$!
+       writeme -s $MOUNT/${tfile}-2 &
+       WRITE_PID=$!
+       sleep 1
+       facet_failover $SINGLEMDS
 #define OBD_FAIL_MDS_CONNECT_NET         0x117
 #define OBD_FAIL_MDS_CONNECT_NET         0x117
-    do_facet $SINGLEMDS "lctl set_param fail_loc=0x80000117"
-    kill -USR1 $PID
-    stat1=`count_ost_writes`
-    sleep $TIMEOUT
-    stat2=`count_ost_writes`
-    echo "$stat1, $stat2"
-    if [ $stat1 -lt $stat2 ]; then
-       echo "writes continuing during recovery"
-       RC=0
-    else
-       echo "writes not continuing during recovery, bug 2477"
-       RC=4
-    fi
-    echo "waiting for writeme $WRITE_PID"
-    kill $WRITE_PID
-    wait $WRITE_PID
-
-    echo "waiting for multiop $PID"
-    wait $PID || return 2
-    do_facet client munlink $MOUNT/$tfile  || return 3
-    do_facet client munlink $MOUNT/${tfile}-2  || return 3
-    return $RC
+       do_facet $SINGLEMDS "lctl set_param fail_loc=0x80000117"
+       kill -USR1 $PID
+       stat1=`count_ost_writes`
+       sleep $TIMEOUT
+       stat2=`count_ost_writes`
+       echo "$stat1, $stat2"
+       if [ $stat1 -lt $stat2 ]; then
+               echo "writes continuing during recovery"
+               RC=0
+       else
+               echo "writes not continuing during recovery, bug 2477"
+               RC=4
+       fi
+       echo "waiting for writeme $WRITE_PID"
+       kill $WRITE_PID
+       wait $WRITE_PID
+
+       echo "waiting for multiop $PID"
+       wait $PID || return 2
+       do_facet client munlink $MOUNT/$tfile  || return 3
+       do_facet client munlink $MOUNT/${tfile}-2  || return 3
+       return $RC
 }
 run_test 40 "cause recovery in ptlrpc, ensure IO continues"
 
 }
 run_test 40 "cause recovery in ptlrpc, ensure IO continues"