Whamcloud - gitweb
LU-1999 tests: check LW client eviction in logs
authorJohann Lombardi <johann@whamcloud.com>
Fri, 21 Sep 2012 07:54:17 +0000 (09:54 +0200)
committerOleg Drokin <green@whamcloud.com>
Mon, 24 Sep 2012 20:45:06 +0000 (16:45 -0400)
A lightweight client can reconnect rather quickly after a server
restart (they are allowed to reconnect during recovery), which
confuses wait_client_evicted().
A more reliable check is to search for eviction message in the log.

Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Change-Id: Idb5fda48c7d73c465c8d69c18f2040d5fa08e3ba
Reviewed-on: http://review.whamcloud.com/4069
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
lustre/tests/recovery-small.sh

index 997bc78..45cf76e 100755 (executable)
@@ -2,8 +2,8 @@
 
 set -e
 
-#         bug  5494 5493  LU1999
-ALWAYS_EXCEPT="24   52    106    $RECOVERY_SMALL_EXCEPT"
+#         bug  5494 5493
+ALWAYS_EXCEPT="24   52    $RECOVERY_SMALL_EXCEPT"
 
 export MULTIOP=${MULTIOP:-multiop}
 PTLDEBUG=${PTLDEBUG:--1}
@@ -1518,8 +1518,14 @@ test_106() { # LU-1789
        facet_failover $SINGLEMDS
 
        # lightweight connection must be evicted
-       wait_client_evicted $SINGLEMDS $MDS_NEXP $((TIMEOUT * 3)) || \
-               error "lightweight client not evicted by mds"
+       touch -c $DIR2/$tfile || true
+       evicted=`dmesg | awk '/test 106/ {start = 1;}
+                             /This client was evicted by .*MDT0000/ {
+                                     if (start) {
+                                             print;
+                                     }
+                             }'`
+       [ -z "$evicted" ] && error "lightweight client not evicted by mds"
 
        # and all operations performed by lightweight client should be
        # synchronous, so the file created before mds restart should be there