mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-05-23 06:54:58 +03:00
ZTS: Restore some delays in online_offline tests
After more CI runs and code reading after #17259 I've found that online starts resilver via async mechanism, which does not provide wait primitives at this time. Restore some delays to restore CI until this is properly fixed. Signed-off-by: Alexander Motin <mav@FreeBSD.org> Sponsored by: iXsystems, Inc.
This commit is contained in:
parent
f86d9af16b
commit
f85c96edf7
@ -59,6 +59,7 @@ function cleanup
|
|||||||
log_must zpool online $TESTPOOL $disk
|
log_must zpool online $TESTPOOL $disk
|
||||||
log_must check_state $TESTPOOL $disk "online"
|
log_must check_state $TESTPOOL $disk "online"
|
||||||
done
|
done
|
||||||
|
sleep 1 # Delay for resilver to start
|
||||||
log_must zpool wait -t resilver $TESTPOOL
|
log_must zpool wait -t resilver $TESTPOOL
|
||||||
|
|
||||||
[[ -e $TESTDIR ]] && log_must rm -rf $TESTDIR/*
|
[[ -e $TESTDIR ]] && log_must rm -rf $TESTDIR/*
|
||||||
@ -77,7 +78,7 @@ for disk in $DISKLIST; do
|
|||||||
|
|
||||||
log_must zpool online $TESTPOOL $disk
|
log_must zpool online $TESTPOOL $disk
|
||||||
log_must check_state $TESTPOOL $disk "online"
|
log_must check_state $TESTPOOL $disk "online"
|
||||||
|
sleep 1 # Delay for resilver to start
|
||||||
log_must zpool wait -t resilver $TESTPOOL
|
log_must zpool wait -t resilver $TESTPOOL
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -60,6 +60,7 @@ function cleanup
|
|||||||
log_must zpool online $TESTPOOL $disk
|
log_must zpool online $TESTPOOL $disk
|
||||||
log_must check_state $TESTPOOL $disk "online"
|
log_must check_state $TESTPOOL $disk "online"
|
||||||
done
|
done
|
||||||
|
sleep 1 # Delay for resilver to start
|
||||||
log_must zpool wait -t resilver $TESTPOOL
|
log_must zpool wait -t resilver $TESTPOOL
|
||||||
|
|
||||||
[[ -e $TESTDIR ]] && log_must rm -rf $TESTDIR/*
|
[[ -e $TESTDIR ]] && log_must rm -rf $TESTDIR/*
|
||||||
@ -89,6 +90,7 @@ while [[ $i -lt ${#disks[*]} ]]; do
|
|||||||
log_must zpool online $TESTPOOL ${disks[$i]}
|
log_must zpool online $TESTPOOL ${disks[$i]}
|
||||||
check_state $TESTPOOL ${disks[$i]} "online" || \
|
check_state $TESTPOOL ${disks[$i]} "online" || \
|
||||||
log_fail "Failed to set ${disks[$i]} online"
|
log_fail "Failed to set ${disks[$i]} online"
|
||||||
|
sleep 1 # Delay for resilver to start
|
||||||
log_must zpool wait -t resilver $TESTPOOL
|
log_must zpool wait -t resilver $TESTPOOL
|
||||||
log_must zpool clear $TESTPOOL
|
log_must zpool clear $TESTPOOL
|
||||||
while [[ $j -lt ${#disks[*]} ]]; do
|
while [[ $j -lt ${#disks[*]} ]]; do
|
||||||
@ -121,6 +123,7 @@ while [[ $i -lt ${#disks[*]} ]]; do
|
|||||||
log_must zpool online $TESTPOOL ${disks[$i]}
|
log_must zpool online $TESTPOOL ${disks[$i]}
|
||||||
check_state $TESTPOOL ${disks[$i]} "online" || \
|
check_state $TESTPOOL ${disks[$i]} "online" || \
|
||||||
log_fail "Failed to set ${disks[$i]} online"
|
log_fail "Failed to set ${disks[$i]} online"
|
||||||
|
sleep 1 # Delay for resilver to start
|
||||||
log_must zpool wait -t resilver $TESTPOOL
|
log_must zpool wait -t resilver $TESTPOOL
|
||||||
log_must zpool clear $TESTPOOL
|
log_must zpool clear $TESTPOOL
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user