From efef4c7663bb24227fc746795b8498fe2e1ddfe3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Va=C5=A1ek?= Date: Tue, 12 Aug 2025 17:37:00 +0200 Subject: [PATCH] tests-extra: ixfr/master_pin2 -- align the servers at the start Notice: Both masters send their NOTIFY's to the slave. The slave makes refresh from the last master which it received NOTIFY from - it's the current state of Knot DNS design. If a NOTIFY for lower serial arrives close enough after the previous NOTIFY for a higher serial from another master, before the slave made refresh from the first master, the first NOTIFY "knowledge" gets "overwritten" by the second one with lower serial, resulting in refresh from the lagging behind master and a rare test failure. --- tests-extra/tests/ixfr/master_pin2/test.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests-extra/tests/ixfr/master_pin2/test.py b/tests-extra/tests/ixfr/master_pin2/test.py index a7deac6c7..cfc242180 100644 --- a/tests-extra/tests/ixfr/master_pin2/test.py +++ b/tests-extra/tests/ixfr/master_pin2/test.py @@ -52,11 +52,26 @@ for m in [ masterA, masterB ]: m.dnssec(zones).enable = True m.conf_zone(zones).journal_content = "all" +masterA.conf_zone(zones).notify_delay = "0" # Disable even the small random value tests use. +masterB.conf_zone(zones).notify_delay = "0" # masterB.conf_zone(zones).serial_modulo = str(-PIN) t.start() +ma_serials0 = masterA.zones_wait(zones) +mb_serials0 = masterB.zones_wait(zones) +slave.zones_wait(zones) + +# Align the masters before the testing starts. +slave.ctl("zone-freeze", wait=True) serials0 = slave.zones_wait(zones) +masterA.ctl("zone-sign") +masterB.ctl("zone-sign") +masterA.zones_wait(zones, ma_serials0) +masterB.zones_wait(zones, mb_serials0) +slave.ctl("zone-thaw") + +serials0 = slave.zones_wait(zones, serials0) for m in [ masterA, masterB ]: up = m.update(zone) @@ -79,6 +94,7 @@ masterA.ctl("zone-thaw") t.sleep(4) +# May fail occasionally, for details see this commit's message. check_cur(masterA, masterB) RUNNING = False