mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-24 18:39:34 +03:00
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
70d2e938b5
commit
756c58cf71
@ -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
|
||||
|
@ -31,4 +31,3 @@ if ! is_linux ; then
|
||||
fi
|
||||
|
||||
default_mirror_setup $DISKS
|
||||
log_pass
|
||||
|
Loading…
Reference in New Issue
Block a user