Whamcloud - gitweb
LU-10577 tests: fix lfsck-performance for separate MGT and MDT 75/31075/2
authorElena Gryaznova <c17455@cray.com>
Mon, 29 Jan 2018 17:30:54 +0000 (20:30 +0300)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 14 Feb 2018 00:52:53 +0000 (00:52 +0000)
lfsck-performance 0,1,2,3 tests run stopall and then mount MDT
which cause the tests failures on configuration with not
combined MGS/MDS.
Patch fixes these tests defects.

Signed-off-by: Elena Gryaznova <c17455@cray.com>
Cray-bug-id: LUS-2534
Test-Parameters: testlist=lfsck-performance
Reviewed-by: Vladimir Saveliev <c17830@cray.com>
Reviewed-by: Andriy Skulysh <c17819@cray.com>
Change-Id: I24c15b9998511bab3dc6fdd3445793e70281c890
Reviewed-on: https://review.whamcloud.com/31075
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/lfsck-performance.sh

index ead92af..d9ace79 100644 (file)
@@ -131,11 +131,18 @@ lfsck_create_nfiles() {
 
 build_test_filter
 
+format_start_mgs () {
+       do_rpc_nodes $(facet_active_host mgs) load_modules_local
+       format_mgs
+       start mgs $(mgsdevname) $MGS_MOUNT_OPTS
+}
+
 test_0() {
        local BCOUNT=0
        local i
 
        stopall
+       combined_mgs_mds || format_start_mgs
        do_rpc_nodes $(facet_active_host $SINGLEMDS) load_modules_local
        format_mdt $(facet_number $SINGLEMDS)
 
@@ -167,6 +174,7 @@ test_0() {
                echo "lfsck_namespace speed is ${SPEED}/sec"
                stop ${SINGLEMDS} > /dev/null || error "Fail to stop MDS!"
        done
+       combined_mgs_mds || stop mgs
 }
 run_test 0 "lfsck namespace performance (routine case) without load"
 
@@ -178,6 +186,7 @@ test_1() {
        local i
 
        stopall
+       combined_mgs_mds || format_start_mgs
        do_rpc_nodes $(facet_active_host $SINGLEMDS) load_modules_local
        format_mdt $(facet_number $SINGLEMDS)
 
@@ -220,6 +229,7 @@ test_1() {
                echo "lfsck_namespace speed is ${SPEED}/sec"
                stop ${SINGLEMDS} > /dev/null || error "Fail to stop MDS!"
        done
+       combined_mgs_mds || stop mgs
 }
 run_test 1 "lfsck namespace performance (backup/restore) without load"
 
@@ -229,6 +239,7 @@ test_2() {
        for ((i = $MINCOUNT_REPAIR; i <= $MAXCOUNT_REPAIR;
              i = $((i * FACTOR)))); do
                stopall
+               combined_mgs_mds || format_start_mgs
                do_rpc_nodes $(facet_active_host $SINGLEMDS) load_modules_local
                format_mdt $(facet_number $SINGLEMDS)
 
@@ -256,6 +267,7 @@ test_2() {
                echo "lfsck_namespace speed is ${SPEED}/sec"
                stop ${SINGLEMDS} > /dev/null || error "Fail to stop MDS!"
        done
+       combined_mgs_mds || stop mgs
 }
 run_test 2 "lfsck namespace performance (upgrade from 1.8) without load"
 
@@ -267,6 +279,7 @@ test_3() {
        local i
 
        stopall
+       combined_mgs_mds || format_start_mgs
        do_rpc_nodes $(facet_active_host $SINGLEMDS) load_modules_local
        format_mdt $(facet_number $SINGLEMDS)
 
@@ -338,6 +351,7 @@ test_3() {
        lfsck_create_nfiles ${nfiles} ${BCOUNT} ${NTHREADS} ||
                error "Fail to create files!"
        echo "+++ end to create for ${i} files set at: $(date) +++"
+       combined_mgs_mds || stop mgs
 }
 run_test 3 "lfsck namespace impact on create performance"