Whamcloud - gitweb
b=22658 a conf-sanity test case for the proper missing llogs handling
authorAndrew Perepechko <Andrew.Perepechko@Sun.COM>
Tue, 29 Jun 2010 15:33:51 +0000 (19:33 +0400)
committerJohann Lombardi <johann@sun.com>
Wed, 30 Jun 2010 14:13:15 +0000 (16:13 +0200)
a=Johann Lombardi

i=Johann Lombardi
i=Andrew Perepechko

lustre/tests/conf-sanity.sh

index 373118c..e1a6bf6 100644 (file)
@@ -2261,6 +2261,28 @@ test_57() { # bug 22656
 }
 run_test 57 "initial registration from failnode should fail (should return errs)"
 
+test_58() { # bug 22658
+        [ "$FSTYPE" != "ldiskfs" ] && skip "not supported for $FSTYPE" && return
+       setup
+       mkdir -p $DIR/$tdir
+       createmany -o $DIR/$tdir/$tfile-%d 100
+       # make sure that OSTs do not cancel llog cookies before we unmount the MDS
+#define OBD_FAIL_OBD_LOG_CANCEL_NET      0x601
+       do_facet mds "lctl set_param fail_loc=0x601"
+       unlinkmany $DIR/$tdir/$tfile-%d 100
+       stop mds
+       local MNTDIR=$(facet_mntpt mds)
+       # remove all files from the OBJECTS dir
+       do_facet mds "mount -t ldiskfs $MDSDEV $MNTDIR"
+       do_facet mds "find $MNTDIR/OBJECTS -type f -delete"
+       do_facet mds "umount $MNTDIR"
+       # restart MDS with missing llog files
+       start_mds
+       do_facet mds "lctl set_param fail_loc=0"
+       reformat
+}
+run_test 58 "missing llog files must not prevent MDT from mounting"
+
 if ! combined_mgs_mds ; then
        stop mgs
 fi