Whamcloud - gitweb
LU-8550 test: fix problems of conf-sanity test_32 46/22146/3
authorLi Xi <lixi@ddn.com>
Mon, 22 Aug 2016 08:22:30 +0000 (16:22 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 15 Feb 2017 01:03:07 +0000 (01:03 +0000)
1) test_32a: The MGS should be umounted otherwise the seperate
MGS will cause failure of conf-sanity 32a. and re-start mgs in
t32_test_cleanup() because mgs need be always started.
2) test_32c: Format and tunefs on the same mds in conf-sanity 32
tests If mds1 and mds2 are different machine, conf-sanity 32c
will fail.

    Test-Parameters: trivial combinedmdsmgs=false envdefinitions=ONLY=32 testlist=conf-sanity

    Test-Parameters: trivial envdefinitions=ONLY=32 testlist=conf-sanity

Change-Id: I16e259d16912f894341a17855aca1e3fbbe6a8f3
Signed-off-by: Gu Zheng <gzheng@ddn.com>
Reviewed-on: https://review.whamcloud.com/22146
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Wang Shilong <wshilong@ddn.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/conf-sanity.sh

index 2a0dc2d..02e2a61 100755 (executable)
@@ -1530,6 +1530,7 @@ t32_test_cleanup() {
                        destroy_zpool $facet $poolname
                done
        fi
+       combined_mgs_mds || start_mgs || rc=$?
        return $rc
 }
 
@@ -1678,7 +1679,6 @@ t32_test() {
        local mdt2_is_available=false
        local node=$(facet_active_host $SINGLEMDS)
        local r="do_node $node"
-       local node2=$(facet_active_host mds2)
        local tmp=$TMP/t32
        local img_commit
        local img_kernel
@@ -1702,6 +1702,7 @@ t32_test() {
        local stripe_count
        local dir
 
+       combined_mgs_mds || stop_mgs || error "Unable to stop MGS"
        trap 'trap - RETURN; t32_test_cleanup' RETURN
 
        load_modules
@@ -1852,13 +1853,13 @@ t32_test() {
                        mkfsoptions="--mkfsoptions=\\\"-J size=8\\\""
                fi
 
-               add fs2mds $(mkfs_opts mds2 $fs2mdsdev $fsname) --reformat \
+               add $SINGLEMDS $(mkfs_opts mds2 $fs2mdsdev $fsname) --reformat \
                           $mkfsoptions $fs2mdsdev $fs2mdsvdev > /dev/null || {
                        error_noexit "Mkfs new MDT failed"
                        return 1
                }
 
-               [[ $(facet_fstype mds1) != zfs ]] || import_zpool fs2mds
+               [[ $(facet_fstype mds1) != zfs ]] || import_zpool mds1
 
                $r $TUNEFS --dryrun $fs2mdsdev || {
                        error_noexit "tunefs.lustre before mounting the MDT"