Whamcloud - gitweb
LU-12677 tests: conf-sanity test_21d must keep zpool 48/35848/5
authorShaun Tancheff <stancheff@cray.com>
Fri, 4 Oct 2019 09:25:07 +0000 (04:25 -0500)
committerOleg Drokin <green@whamcloud.com>
Sat, 14 Dec 2019 05:58:58 +0000 (05:58 +0000)
Currently test_21d destroys the zpool during writeconf_or_reformat
but the zpool must be preserved for writeconf to work as intended.

Cray-bug-id: LUS-7688
Test-Parameters: fstype=zfs testlist=conf-sanity
Signed-off-by: Shaun Tancheff <stancheff@cray.com>
Change-Id: I8fdc123504b70e59a9ca789141e56815377f6b35
Reviewed-on: https://review.whamcloud.com/35848
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Petros Koutoupis <pkoutoupis@cray.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Nathaniel Clark <nclark@whamcloud.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/conf-sanity.sh

index 23d434a..2c393d5 100644 (file)
@@ -757,12 +757,18 @@ test_21d() {
        start_mds || error "MDS start failed"
        wait_osc_import_state mds ost2 FULL
 
+       local zkeeper=${KEEP_ZPOOL}
+       stack_trap "KEEP_ZPOOL=$zkeeper" EXIT
+       KEEP_ZPOOL="true"
+
        stop_ost || error "Unable to stop OST1"
        stop_ost2 || error "Unable to stop OST2"
        stop_mds || error "Unable to stop MDS"
        stop_mgs
        #writeconf to remove all ost2 traces for subsequent tests
        writeconf_or_reformat
+       KEEP_ZPOOL="${zkeeper}"
+
        start_mgs || error "unable to start MGS"
 }
 run_test 21d "start mgs then ost and then mds"