atenet/dns: actor zone returns SERVFAIL for non-A queries, breaking strict resolvers (e.g., Alpine/musl) - #874
Conversation
7a240f7 to
0272dc0
Compare
|
Bowei Du (@bowei) Julian Gutierrez Oschmann (@juli4n) mind taking a look? This is the SERVFAIL half of #246, step one of your three: the actor zone can't Julian Gutierrez Oschmann (@juli4n), the substance is three Verified against |
f4bc2e5 to
fd6e47c
Compare
|
Yuan -- it would be good to be very specific on what we are doing in this PR. From what I can tell:
Is this what you are trying to do? |
|
Close, but that's two PRs and this is the smaller one. This PR doesn't publish an AAAA. It makes the zone return a correct rcode for what it doesn't answer — NODATA for a real actor name on a non-A qtype, NXDOMAIN for a name in the zone that doesn't exist. Both SERVFAIL today, on IPv4-only clusters too, which is why musl-based actors can't resolve each other at all: #888. Publishing AAAA is #938. The three together:
Every actor name resolves to the same address — the router ClusterIP, with per-actor demux at Envoy on the Host header — so an AAAA for a Substrate name is those three things, and no one of them is useful alone. End state on dual-stack: an actor name resolves in both families and Envoy answers on either. Each PR carries its own verification; the real gap is that dual-stack isn't testable until #877 lands, so #911's dual-stack behaviour is argued rather than run. On "fix any associated things" — past DNS, three more sit between a published AAAA and a usable IPv6 path, now filed as step-3 sub-tasks: #943, #944, #945. |
1634ab3 to
f8b1782
Compare
f45e43f to
482ec1d
Compare
Before, the actor zone answered A queries and failed everything else -- AAAA for a valid actor, and any name in the zone that is not an actor. A failure reads as a temporary error rather than an answer, so clients retry it and then give up on the name; Alpine actors could not resolve each other at all, even on an IPv4-only cluster. After, those queries return a correct empty answer, and one that resolvers can cache. Unit tests pin the rendered zone. The before/after behaviour was verified against the pinned coredns/coredns:1.11.1, where an Alpine getent for an actor name goes from timing out to answering immediately.
482ec1d to
9cf8384
Compare
Fixes: #888
Background & Problem
When modern operating systems resolve a hostname, they query for both IPv4 (
A) and IPv6 (AAAA) records concurrently. Currently, the actor DNS zone only answersAqueries and returns aSERVFAIL(rcode 2) for everything else. ASERVFAILresponse is treated as a hard network error by strict resolvers (rather than a successful empty answer).Changes in this PR
This PR ensures the zone returns a correct response code for what it does not answer, rather than crashing out with
SERVFAIL. Specifically, it introduces:NODATAresponse: For valid actor names queried with non-A types (e.g.,AAAA,HTTPS,SRV), we now use a regex-scopedNODATAtemplate that returnsrcode NOERRORalongside an SOA record in the authority section.NXDOMAINresponse: A terminalNXDOMAINcatch-all is added for names in the zone that do not exist.(Note: This PR does not publish an
AAAArecord; it only fixes the zone's error handling to unblock IPv4 clients. Publishing theAAAArecord is handled separately in #938.)