Skip to content

Commit 01ddebb

Browse files
committed
zfs: wipe disk after zpool destroy in zfs sr teardown
zpool destroy removes the pool but leaves ZFS member signatures and the partition table on disk, causing the device to appear in use on the next test run. Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>
1 parent e15bf72 commit 01ddebb

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

tests/storage/zfs/conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ def zpool_vol0(sr_disk_wiped: str, host_with_zfs: Host) -> Generator[None, None,
4444
yield
4545
# teardown
4646
host_with_zfs.ssh(f'zpool destroy {POOL_NAME}')
47+
host_with_zfs.ssh(f'wipefs -a /dev/{sr_disk_wiped}')
4748

4849
@pytest.fixture(scope='package')
4950
def zfs_sr(host: Host, image_format: ImageFormat, zpool_vol0: None) -> Generator[SR, None, None]:

0 commit comments

Comments
 (0)