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.
This commit is contained in:
Martin Weinelt 2024-05-12 16:40:23 +02:00
parent 29f0314ded
commit c1b293ca0c
No known key found for this signature in database
GPG Key ID: 87C1E9888F856759

View File

@ -190,6 +190,10 @@ in {
primary.wait_for_unit("knot.service") primary.wait_for_unit("knot.service")
secondary.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): def test(host, query_type, query, pattern):
out = client.succeed(f"khost -t {query_type} {query} {host}").strip() out = client.succeed(f"khost -t {query_type} {query} {host}").strip()