Whamcloud - gitweb
LU-924 test: sync client data before reboot server
authorNiu Yawei <niu@whamcloud.com>
Mon, 19 Dec 2011 06:51:26 +0000 (22:51 -0800)
committerOleg Drokin <green@whamcloud.com>
Wed, 4 Jan 2012 15:53:19 +0000 (10:53 -0500)
Lustre doesn't write client data synchronously (to avoid flooding sync
writes when there are many clients connecting, see exp_need_sync), so
if the server reboots before client data reachs disk, the client data
will be lost and client will be evicted after recovery, which is not
what we expected.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I21bcafe1f2630285c9108c0528467eb177e3449b
Reviewed-on: http://review.whamcloud.com/1888
Tested-by: Hudson
Reviewed-by: Chris Gearing <chris@whamcloud.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/test-framework.sh

index 06224d3..95c89d8 100644 (file)
@@ -1517,6 +1517,14 @@ facet_failover() {
 
     echo "Failing $facet on node $host"
 
 
     echo "Failing $facet on node $host"
 
+    # Make sure the client data is synced to disk. LU-924
+    #
+    # We don't write client data synchrnously (to avoid flooding sync writes
+    # when there are many clients connecting), so if the server reboots before
+    # the client data reachs disk, the client data will be lost and the client
+    # will be evicted after recovery, which is not what we expected.
+    do_facet $facet "sync; sync; sync"
+
     local affected=$(affected_facets $facet)
 
     shutdown_facet $facet
     local affected=$(affected_facets $facet)
 
     shutdown_facet $facet