DNS test suite needs to do better lockstep on checking that DNS updates happened

Bug #1550540 reported by LaMont Jones
This bug affects 2 people
Affects Status Importance Assigned to Milestone
LaMont Jones
LaMont Jones

Bug Description

Right now, we use the magic of "time.sleep(0.2)" ahead of the dns query in maasserver/dns/tests/test_config.py, which is all to frequently still not enough.

We need to expand that to:
1) know what SOA we expect, and
2) wait for the SOA to be there, or for an arbitrary timeout to occur (10 seconds would seem sufficient)

FWIW, the SOA serial number comes back in the authority section of an NXDOMAIN, and most of the test failures are because the record has no value, rather than the wrong value, so we could just do the lookup and get the SOA that way. (Though if the test is looking for a change in the right-hand side for an existing label, then the SOA query would need to be done explicitly, so maybe that's best.)

The less involved way (if knowing the correct serial number is "hard"), would be to just retry the query until we get a non-empty answer, or $TIMEOUT occurs.

Related branches

LaMont Jones (lamont)
Changed in maas:
assignee: nobody → LaMont Jones (lamont)
no longer affects: maas/1.10
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers