HomeFreeBSD

ZTS: Fix upgrade_readonly_pool

Description

ZTS: Fix upgrade_readonly_pool

Update cleanup_upgrade to use destroy_dataset and destroy_pool
when performing cleanup. These wrappers retry if the pool is busy
preventing occasional failures like those observed when running
tests upgrade_readonly_pool. For example:

    SUCCESS: test enabled == enabled
    User accounting upgrade is not executed on readonly pool
    NOTE: Performing local cleanup via log_onexit (cleanup_upgrade)
    cannot destroy 'testpool': pool is busy
    ERROR: zpool destroy testpool exited 1

Reviewed-by: Ryan Moeller <ryan@ixsystems.com>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Igor Kozhukhov <igor@dilos.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #9400

Details

Provenance
Brian Behlendorf <behlendorf1@llnl.gov>Authored on Oct 3 2019, 4:39 PM
GitHub <noreply@github.com>Committed on Oct 3 2019, 4:39 PM
Parents
rG8ae8b2a1445b: Workaround to avoid a race when /var/lib is a persistent dataset
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rGe1c216fb0c33: ZTS: Fix upgrade_readonly_pool (authored by Brian Behlendorf <behlendorf1@llnl.gov>).Oct 3 2019, 4:39 PM