mirror of
https://gitlab.nic.cz/knot/knot-dns.git
synced 2026-05-28 04:02:31 -04:00
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.
This commit is contained in:
parent
9e6e4a453c
commit
efef4c7663
1 changed files with 16 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue