Whamcloud - gitweb
LU-9899 tests: mount client on MGS for tests with pools
[fs/lustre-release.git] / lustre / tests / conf-sanity.sh
index 7088394..6e272a1 100644 (file)
@@ -68,8 +68,8 @@ if ! combined_mgs_mds; then
        ALWAYS_EXCEPT="$ALWAYS_EXCEPT  43b     53b     54b"
        # bug number for skipped test: LU-9875 LU-9879 LU-9879 LU-9879 LU-9879
        ALWAYS_EXCEPT="$ALWAYS_EXCEPT  70e     80      84      87      100"
-       # bug number for skipped test: LU-8110 LU-9400 LU-9879 LU-9879 LU-9879
-       ALWAYS_EXCEPT="$ALWAYS_EXCEPT  102     103     104     105     107"
+       # bug number for skipped test: LU-8110 LU-9879 LU-9879 LU-9879
+       ALWAYS_EXCEPT="$ALWAYS_EXCEPT  102     104     105     107"
 fi
 
 # pass "-E lazy_itable_init" to mke2fs to speed up the formatting time
@@ -1689,6 +1689,7 @@ t32_test() {
        local tarball=$1
        local writeconf=$2
        local dne_upgrade=${dne_upgrade:-"no"}
+       local dom_upgrade=${dom_upgrade:-"no"}
        local ff_convert=${ff_convert:-"no"}
        local shall_cleanup_mdt=false
        local shall_cleanup_mdt1=false
@@ -2025,11 +2026,6 @@ t32_test() {
                shall_cleanup_lustre=true
                $r $LCTL set_param debug="$PTLDEBUG"
 
-               t32_verify_quota $node $fsname $tmp/mnt/lustre || {
-                       error_noexit "verify quota failed"
-                       return 1
-               }
-
                if $r test -f $tmp/list; then
                        #
                        # There is not a Test Framework API to copy files to or
@@ -2081,6 +2077,43 @@ t32_test() {
                        echo "list verification skipped"
                fi
 
+               if [ "$dom_upgrade" != "no" ]; then
+                       echo "Check DoM file can be created"
+                       $LFS setstripe -E 1M -L mdt -E EOF $tmp/mnt/lustre/dom || {
+                               error_noexit "Verify DoM creation"
+                               return 1
+                       }
+                       [ $($LFS getstripe -L $tmp/mnt/lustre/dom) == 100 ] || {
+                               error_noexit "Verify a DoM file"
+                               return 1
+                       }
+                       dd if=/dev/urandom of=$tmp/mnt/lustre/dom bs=4096 \
+                               count=1 conv=fsync || {
+                               error_noexit "Cannot write to DoM file"
+                               return 1
+                       }
+                       [ $(stat -c%s $tmp/mnt/lustre/dom) == 4096 ] || {
+                               error_noexit "DoM: bad size after write"
+                               return 1
+                       }
+                       rm $tmp/mnt/lustre/dom
+
+                       $r $LCTL get_param -n lod.*MDT0000*.dom_stripesize || {
+                               error_noexit "Getting \"dom_stripesize\""
+                               return 1
+                       }
+                       $r $LCTL conf_param \
+                               $fsname-MDT0000.lod.dom_stripesize=0 || {
+                               error_noexit "Changing \"dom_stripesize\""
+                               return 1
+                       }
+                       wait_update $(facet_host mds) "$LCTL get_param \
+                               -n lod.*MDT0000*.dom_stripesize" 0 || {
+                               error_noexit "Verifying \"dom_stripesize\""
+                               return 1
+                       }
+               fi
+
                if [ "$dne_upgrade" != "no" ]; then
                        $LFS mkdir -i 1 -c2 $tmp/mnt/lustre/striped_dir || {
                                error_noexit "set striped dir failed"
@@ -2385,6 +2418,21 @@ test_32d() {
 }
 run_test 32d "convert ff test"
 
+test_32e() {
+       local tarballs
+       local tarball
+       local rc=0
+
+       t32_check
+       for tarball in $tarballs; do
+               echo $tarball | grep "2_9" || continue
+               #load_modules
+               dom_upgrade=yes t32_test $tarball writeconf || let "rc += $?"
+       done
+       return $rc
+}
+run_test 32e "dom upgrade test"
+
 test_33a() { # bug 12333, was test_33
        local FSNAME2=test-123
        local MDSDEV=$(mdsdevname ${SINGLEMDS//mds/})
@@ -5873,6 +5921,9 @@ cleanup_82b() {
        # Remove OSTs from a pool and destroy the pool.
        destroy_pool $ost_pool || true
 
+       if ! combined_mgs_mds ; then
+               umount_mgs_client
+       fi
        restore_ostindex
 }
 
@@ -5912,6 +5963,10 @@ test_82b() { # LU-4665
        done
 
        mount_client $MOUNT || error "mount client $MOUNT failed"
+       if ! combined_mgs_mds ; then
+               mount_mgs_client
+       fi
+
        wait_osts_up
        $LFS df $MOUNT || error "$LFS df $MOUNT failed"
        mkdir $DIR/$tdir || error "mkdir $DIR/$tdir failed"
@@ -7261,7 +7316,7 @@ test_renamefs() {
 
        echo "rename $FSNAME to $newname"
 
-       if [ ! combined_mgs_mds ]; then
+       if ! combined_mgs_mds ; then
                local facet=$(mgsdevname)
 
                do_facet mgs \
@@ -7333,6 +7388,9 @@ test_103() {
        cp $LUSTRE/tests/test-framework.sh $DIR/$tdir ||
                error "(2) Fail to copy test-framework.sh"
 
+       if ! combined_mgs_mds ; then
+               mount_mgs_client
+       fi
        do_facet mgs $LCTL pool_new $FSNAME.pool1 ||
                error "(3) Fail to create $FSNAME.pool1"
        # name the pool name as the fsname
@@ -7344,6 +7402,9 @@ test_103() {
        $SETSTRIPE -p $FSNAME $DIR/$tdir/d0 ||
                error "(6) Fail to setstripe on $DIR/$tdir/d0"
 
+       if ! combined_mgs_mds ; then
+               umount_mgs_client
+       fi
        KEEP_ZPOOL=true
        stopall
 
@@ -7353,6 +7414,9 @@ test_103() {
        FSNAME="mylustre"
        setupall
 
+       if ! combined_mgs_mds ; then
+               mount_mgs_client
+       fi
        test_103_check_pool $save_fsname 7
 
        if [ $OSTCOUNT -ge 2 ]; then
@@ -7361,6 +7425,9 @@ test_103() {
 
        $SETSTRIPE -p $save_fsname $DIR/$tdir/f0 ||
                error "(16) Fail to setstripe on $DIR/$tdir/f0"
+       if ! combined_mgs_mds ; then
+               umount_mgs_client
+       fi
 
        stopall
 
@@ -7369,8 +7436,14 @@ test_103() {
        FSNAME="tfs"
        setupall
 
+       if ! combined_mgs_mds ; then
+               mount_mgs_client
+       fi
        test_103_check_pool $save_fsname 17
 
+       if ! combined_mgs_mds ; then
+               umount_mgs_client
+       fi
        stopall
 
        test_renamefs $save_fsname