DNS test suite needs to do better lockstep on checking that DNS updates happened
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Undecided
|
LaMont Jones |
Bug Description
Right now, we use the magic of "time.sleep(0.2)" ahead of the dns query in maasserver/
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
- Gavin Panella (community): Approve
-
Diff: 39 lines (+19/-4)1 file modifiedsrc/maasserver/dns/tests/test_config.py (+19/-4)
- Gavin Panella (community): Approve
-
Diff: 773 lines (+193/-159)11 files modifiedrequired-packages/dev (+1/-0)
src/maasserver/dns/config.py (+4/-3)
src/maasserver/dns/tests/test_config.py (+76/-30)
src/maasserver/dns/tests/test_zonegenerator.py (+19/-17)
src/maasserver/dns/zonegenerator.py (+3/-8)
src/maasserver/sequence.py (+24/-0)
src/maasserver/tests/test_sequence.py (+31/-1)
src/provisioningserver/testing/bindfixture.py (+2/-1)
src/provisioningserver/utils/fs.py (+16/-53)
src/provisioningserver/utils/tests/test_fs.py (+16/-46)
utilities/check-imports (+1/-0)
Changed in maas: | |
assignee: | nobody → LaMont Jones (lamont) |
no longer affects: | maas/1.10 |