-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into haskell-updates
- Loading branch information
Showing
97 changed files
with
1,422 additions
and
455 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14251,4 +14251,16 @@ | |
github = "nigelgbanks"; | ||
githubId = 487373; | ||
}; | ||
zanculmarktum = { | ||
name = "Azure Zanculmarktum"; | ||
email = "[email protected]"; | ||
github = "zanculmarktum"; | ||
githubId = 16958511; | ||
}; | ||
kuwii = { | ||
name = "kuwii"; | ||
email = "[email protected]"; | ||
github = "kuwii"; | ||
githubId = 10705175; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import ./make-test-python.nix ( | ||
{ | ||
nodes.host = {config, pkgs, ...}: { | ||
config = { | ||
# Prerequisites for ZFS and tests. | ||
boot.supportedFilesystems = [ "zfs" ]; | ||
environment.systemPackages = [ pkgs.zrepl ]; | ||
networking.hostId = "deadbeef"; | ||
services.zrepl = { | ||
enable = true; | ||
settings = { | ||
# Enable Prometheus output for status assertions. | ||
global.monitoring = [{ | ||
type = "prometheus"; | ||
listen = ":9811"; | ||
}]; | ||
# Create a periodic snapshot job for an ephemeral zpool. | ||
jobs = [{ | ||
name = "snap_test"; | ||
type = "snap"; | ||
|
||
filesystems."test" = true; | ||
snapshotting = { | ||
type = "periodic"; | ||
prefix = "zrepl_"; | ||
interval = "1s"; | ||
}; | ||
|
||
pruning.keep = [{ | ||
type = "last_n"; | ||
count = 8; | ||
}]; | ||
}]; | ||
}; | ||
}; | ||
}; | ||
}; | ||
|
||
testScript = '' | ||
start_all() | ||
with subtest("Wait for zrepl and network ready"): | ||
host.wait_for_unit("network-online.target") | ||
host.wait_for_unit("zrepl.service") | ||
with subtest("Create test zpool"): | ||
# ZFS requires 64MiB minimum pool size. | ||
host.succeed("fallocate -l 64MiB /root/zpool.img") | ||
host.succeed("zpool create test /root/zpool.img") | ||
with subtest("Check for completed zrepl snapshot"): | ||
# zrepl periodic snapshot job creates a snapshot with this prefix. | ||
host.wait_until_succeeds("zfs list -t snapshot | grep -q zrepl_") | ||
with subtest("Verify HTTP monitoring server is configured"): | ||
out = host.succeed("curl -f localhost:9811/metrics") | ||
assert ( | ||
"zrepl_version_daemon" in out | ||
), "zrepl version metric was not found in Prometheus output" | ||
assert ( | ||
"zrepl_zfs_snapshot_duration_count{filesystem=\"test\"}" in out | ||
), "zrepl snapshot counter for test was not found in Prometheus output" | ||
''; | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.