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:
parent
edb24bec3b
commit
2c47bd575a
|
@ -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
|
||||
|
|
|
@ -27,4 +27,3 @@
|
|||
. $STF_SUITE/include/libtest.shlib
|
||||
|
||||
default_mirror_setup $DISKS
|
||||
log_pass
|
||||
|
|
Loading…
Reference in New Issue