Skip to content

Commit

Permalink
zfs-with-vdevs: increase pool import timeout
Browse files Browse the repository at this point in the history
Fix fixes a long-standing test failures we have with the zfs-with-vdevs.
  • Loading branch information
Mic92 committed Oct 1, 2024
1 parent fc3ba69 commit 4e30bc7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 0 additions & 2 deletions example/zfs-with-vdevs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@
cache = [ "cache" ];
};
};
# Workaround: cannot import 'zroot': I/O error in disko tests
options.cachefile = "none";

rootFsOptions = {
compression = "zstd";
Expand Down
9 changes: 9 additions & 0 deletions tests/zfs-with-vdevs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ diskoLib.testLib.makeDiskoTest {
extraInstallerConfig.networking.hostId = "8425e349";
extraSystemConfig = {
networking.hostId = "8425e349";
# It looks like the 60s of NixOS is sometimes not enough for our virtio-based zpool.
# This fixes the flakeiness of the test.
boot.initrd.postResumeCommands = ''
for i in $(seq 1 120); do
if zpool list | grep -q zroot || zpool import -N zroot; then
break
fi
done
'';
};
extraTestScript = ''
def assert_property(ds, property, expected_value):
Expand Down

0 comments on commit 4e30bc7

Please sign in to comment.