ZTS: Fix occasional inherit_001_pos.ksh failure

The mountpoint may still be busy when the `zfs unmount -a` command
is run causing an unexpected failure.  Retry the unmount a couple
of times since it should not remain busy for long.

    19:10:50.29 NOTE: Reading state from .../inheritance/state021.cfg
    19:10:50.32 cannot unmount '/TESTPOOL': pool or dataset is busy
    19:10:50.32 ERROR: zfs unmount -a exited 1

Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #13686
This commit is contained in:
Brian Behlendorf 2022-07-25 09:52:42 -07:00 committed by GitHub
parent bf61a507a2
commit 8792dd24cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -332,7 +332,7 @@ function scan_state { #state-file
log_note "No operation specified"
else
export __ZFS_POOL_RESTRICT="TESTPOOL"
log_must zfs unmount -a
log_must_busy zfs unmount -a
unset __ZFS_POOL_RESTRICT
for p in ${prop[i]} ${prop[((i+1))]}; do