Repository navigation
docs: Propose one writer per zone for DNS records - #201
Merged
Merged
Conversation
Two record sets can claim one owner name. The agent writes one record set at a time, so it cannot choose between them, and when either one lets the name go, the agent deletes the name the other still claims (#188). The enhancement proposes one reconcile per zone, which builds the zone from every record set that references it and writes the difference. It is rolled out in small releases, each verified locally and on staging. Related to #188
A local load test of the prototype met the 60-second target at production size. It also showed that a pass which writes one record set's status after another waits on the API server once per record set, so a pass now sends its writes in parallel, at most 16 at once.
0xmc
self-requested a review
September 29, 2026 14:53
4 tasks done
The zone controller writes a zone's SOA and NS records only when it creates the zone. After that they are record sets like any other, so the per-zone pass writes them. The serial the SOA carries stays a separate change (#101).
ecv
previously approved these changes
Sep 29, 2026
Contributor
|
oh! |
3 tasks done
This was referenced Oct 3, 2026
3 tasks
The replicator keeps one zone per domain with its accounting ConfigMap, and nothing else writes that ConfigMap. A zone made another way has none, so a project's zone for the same domain is not refused, and EnsureZone treats the PowerDNS zone that already exists as its own. A pass therefore deletes only records that a record set of its own project wrote, and the dry run before rollout counts any domain that more than one project holds.
PowerDNS stores some values in another form, so a text comparison would rewrite those names on every pass and raise the zone's serial each time.
vvoytovych
force-pushed
the
docs/per-zone-writer-enhancement
branch
from
October 5, 2026 18:25
1a4712b to
f6c1c5a
Compare
scotwells
approved these changes
Oct 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What I noticed
Two record sets can claim the same name in a zone. The usual pair is a user's own record and the one Gateway DNS creates for the same hostname. Since
v0.7.0the agent writes one record set at a time, so it never sees both claims and cannot choose between them:Programmed=True. #83 found such pairs in production. In one, the two point at different targets, and the name answers with whichever wrote last.NotOwner, soDNSRecordRejectedcannot fire (runbook).The admission webhook refuses a second claim, but it fails open by design and cannot see older pairs. So the agent still has to decide.
What we plan
The agent writes one zone at a time. It reads every record set of the zone, picks one holder per name by the rule our record ownership document already states (the oldest claim wins, as in Gateway API), and writes only the difference.
We get there in small steps. Each step is its own release. Each is verified locally (unit tests, integration tests against PowerDNS, and the end-to-end suites on three clusters) and then on staging, before it reaches production. The release before it is the rollback.
What it gives us
DNSRecordRejectedworks again.How it fits where we are going
Not in this plan: deleting records we did not write, and replacing the ownership notes.
Take a look, and let me know if you have any major concerns. Thanks.