mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
Debug auto_replace_001_pos failures
Reduced the timeout to 60 seconds which should be more than sufficient and allow the test to be marked as FAILED rather than KILLED. Also dump the pool status on cleanup. Reviewed-by: Brian Atkinson <batkinson@lanl.gov> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #14829
This commit is contained in:
@@ -1951,6 +1951,7 @@ function check_pool_status # pool token keyword <verbose>
|
||||
# is_pool_removing - to check if the pool removing is a vdev
|
||||
# is_pool_removed - to check if the pool remove is completed
|
||||
# is_pool_discarding - to check if the pool checkpoint is being discarded
|
||||
# is_pool_replacing - to check if the pool is performing a replacement
|
||||
#
|
||||
function is_pool_resilvering #pool <verbose>
|
||||
{
|
||||
@@ -1997,6 +1998,10 @@ function is_pool_discarding #pool
|
||||
{
|
||||
check_pool_status "$1" "checkpoint" "discarding"
|
||||
}
|
||||
function is_pool_replacing #pool
|
||||
{
|
||||
zpool status "$1" | grep -qE 'replacing-[0-9]+'
|
||||
}
|
||||
|
||||
function wait_for_degraded
|
||||
{
|
||||
@@ -2983,12 +2988,15 @@ function wait_freeing #pool
|
||||
# Wait for every device replace operation to complete
|
||||
#
|
||||
# $1 pool name
|
||||
# $2 timeout
|
||||
#
|
||||
function wait_replacing #pool
|
||||
function wait_replacing #pool timeout
|
||||
{
|
||||
typeset timeout=${2:-300}
|
||||
typeset pool=${1:-$TESTPOOL}
|
||||
while zpool status $pool | grep -qE 'replacing-[0-9]+'; do
|
||||
log_must sleep 1
|
||||
for (( timer = 0; timer < $timeout; timer++ )); do
|
||||
is_pool_replacing $pool || break;
|
||||
sleep 1;
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user