Keep a local copy of the OpenNIC root zone - #126
Open
zquestz wants to merge 1 commit into
Open
Conversation
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.
Follow-up to #125.
Problem
In OpenNIC mode, Unbound keeps no local copy of the root zone. Every root
delegation is a referral cached from whichever of the five OpenNIC root servers
answered, held for up to
cache-max-ttl(86400). If one of those servers servesstale or incomplete data for a TLD, that TLD can stop resolving until the entry
expires, even though the other four root servers are fine.
I hit this on a live deployment:
.xyzstopped resolving while the rest of thenamespace was unaffected, and it stayed broken until Unbound was restarted,
which points at bad delegation data pinned in cache rather than a config or
network problem.
The ICANN path does not have this exposure, because it already keeps a local
copy of the root zone from internic.net via the existing
auth-zoneblock. TheOpenNIC path was the only one iterating live against the root.
Change
Give OpenNIC mode the same treatment: an
auth-zonefor.slaved from theroot servers already listed in
opennic.hints.opennic.hints, so that file stays thesingle source of truth for which OpenNIC servers the resolver talks to.
Refreshing the hints refreshes the masters, with no separate address to go
stale independently.
already uses for the root.
fallback-enabled: yes, so a failed transfer falls back to querying the rootservers directly, which is today's behavior. Worst case is no worse than now.
var/opennic-root.zone, distinct from the ICANN path'svar/root.zone, so togglingOPENNICon an existing container does not mixthe two.
Testing
Verified on a live Kubernetes deployment with
OPENNIC=1:Resolution works for both the OpenNIC TLDs and the regular namespace. Because of
fallback-enabled, working resolution is not by itself proof the transferhappened, so the zone file above is the real check.