From c1b293ca0c770f3a422402093da5a7b9cc44d2aa Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 12 May 2024 16:40:23 +0200 Subject: [PATCH] nixos/tests/knot: wait for successful zone transfers Depending on the startup order of the two machines it might take a few moments to get both zones transfered, which can lead to SERVFAIL responses on busy machines. --- nixos/tests/knot.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nixos/tests/knot.nix b/nixos/tests/knot.nix index eec94a22f2fa..4441fed6ef50 100644 --- a/nixos/tests/knot.nix +++ b/nixos/tests/knot.nix @@ -190,6 +190,10 @@ in { primary.wait_for_unit("knot.service") secondary.wait_for_unit("knot.service") + for zone in ("example.com.", "sub.example.com."): + secondary.wait_until_succeeds( + f"knotc zone-status {zone} | grep -q 'serial: 2019031302'" + ) def test(host, query_type, query, pattern): out = client.succeed(f"khost -t {query_type} {query} {host}").strip()