Skip to content

Commit

Permalink
ZTS: Fix pool_state cleanup
Browse files Browse the repository at this point in the history
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 openzfs#9777
  • Loading branch information
behlendorf authored and tonyhutter committed Jan 7, 2020
1 parent 2f3d42b commit ce740ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion tests/zfs-tests/tests/functional/procfs/pool_state.ksh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion tests/zfs-tests/tests/functional/procfs/setup.ksh
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,3 @@ if ! is_linux ; then
fi

default_mirror_setup $DISKS
log_pass

0 comments on commit ce740ee

Please sign in to comment.