ZTS: Fix pool_state cleanup

The externally faulted vdev should be brought back online and have
its errors cleared before the pool is destroyed.  Failure to do so
will leave a vdev with a valid active label.  This vdev may then
not be used to create a new pool without the -f flag potentially
leading to subsequent test failures.

Additionally remove an unreachable log_pass from setup.ksh.

Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Kjeld Schouten <kjeld@schouten-lebbing.nl>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #9777
This commit is contained in:
Brian Behlendorf 2019-12-28 08:43:23 -08:00 committed by GitHub
parent edb24bec3b
commit 2c47bd575a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -105,8 +105,10 @@ check_all $TESTPOOL "ONLINE"
# Fault one of the disks, and check that pool is degraded
DISK1=$(echo "$DISKS" | awk '{print $2}')
zpool offline -tf $TESTPOOL $DISK1
log_must zpool offline -tf $TESTPOOL $DISK1
check_all $TESTPOOL "DEGRADED"
log_must zpool online $TESTPOOL $DISK1
log_must zpool clear $TESTPOOL
# Create a new pool out of a scsi_debug disk
TESTPOOL2=testpool2

View File

@ -27,4 +27,3 @@
. $STF_SUITE/include/libtest.shlib
default_mirror_setup $DISKS
log_pass