Whamcloud - gitweb
LU-9908 tests: force umount client in test 70e, 41b, and 105 67/28767/10
authorYang Sheng <yang.sheng@intel.com>
Mon, 28 Aug 2017 19:30:13 +0000 (03:30 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 16 Oct 2017 03:23:23 +0000 (03:23 +0000)
In test_70e, import state may not update while
mds stopping. Since statfs will be invoked in sles12
before umounting, so umount with force flag to avoid
waitting a long time.
Add -f to stopall call in test-framework for the same reason,
to do umount with force flag.

Signed-off-by: Yang Sheng <yang.sheng@intel.com>
Change-Id: I3d1e73b3501e98008ef18c05f7b5498d12cb46fb
Reviewed-on: https://review.whamcloud.com/28767
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/conf-sanity.sh
lustre/tests/test-framework.sh

index 7fd8581..15f59ed 100644 (file)
@@ -255,7 +255,9 @@ cleanup_nocli() {
 }
 
 cleanup() {
-       umount_client $MOUNT || return 200
+       local force=""
+       [ "x$1" != "x" ] && force='-f'
+       umount_client $MOUNT $force|| return 200
        cleanup_nocli || return $?
 }
 
@@ -2890,7 +2892,7 @@ test_41b() {
        echo "blah blah" > $MOUNT/$tfile
        cat $MOUNT/$tfile || error "cat $MOUNT/$tfile failed"
 
-       umount_client $MOUNT || error "umount_client $MOUNT failed"
+       umount_client $MOUNT -f || error "umount_client $MOUNT failed"
        stop_ost || error "Unable to stop OST1"
        stop_mds || error "Unable to stop MDS"
        stop_mds || error "Unable to stop MDS on second try"
@@ -5022,6 +5024,7 @@ test_70e() {
        soc=$(do_facet mds1 "$LCTL get_param -n \
                mdt.*MDT0000.sync_lock_cancel")
        [ $soc == "never" ] || error "SoC enabled on single MDS"
+       umount_client $MOUNT -f > /dev/null
 
        cleanup || error "cleanup failed with $?"
 }
@@ -7431,7 +7434,7 @@ error_and_umount() {
 }
 
 test_105() {
-       cleanup
+       cleanup -f
        reformat
        setup
        mkdir -p $TMP/$tdir
index b0634e5..ed94924 100755 (executable)
@@ -3969,7 +3969,7 @@ format_ost() {
 }
 
 formatall() {
-       stopall
+       stopall -f
        # Set hostid for ZFS/SPL zpool import protection
        # (Assumes MDS version is also OSS version)
        if [ $(lustre_version_code $SINGLEMDS) -ge $(version_code 2.8.54) ];