dns: stop exporting legacy DNS fragments (manage_export false) #495
Reference in New Issue
Block a user
Delete Branch "benvin/dns-export-off"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
During the k8s DNS cutover the
dnsmodule dual-writes every host's records twoways: (a) LEGACY exported
@@concat::fragments collected onto the VM puppet DNSmaster into
/var/named/sources/<zone>.conf, and (b) NEW nsupdate/RFC2136 to thek8s bind-authoritative cluster (
manage_nsupdate). Both were gated on so thelegacy path stayed as a safety net.
The legacy path is no longer in any client's resolution path:
profiles::dns::base::nameserversfrom the VM resolveranycast
198.18.19.16to the k8s bind-resolvers LB198.18.200.7. Everypuppet client now resolves there.
unkin.net,main.unkin.net, and all18.198.in-addr.arpareverse zones to the k8s bind-authoritative cluster(
198.18.200.6), which is populated purely by the nsupdate path — the sameprofiles::dns::recorddefines,manage_nsupdatebranch./var/named/sourcesfiles are therefore orphaned:nothing resolves against them anymore.
This flips
profiles::dns::updater::manage_export: falseto stop nodes exportingthe legacy fragments.
manage_nsupdatestays on.What changes
hieradata/common.yaml:profiles::dns::updater::manage_exporttrue->false.Verification evidence
Pulled all 498 exported
Concat::Fragmentresources from PuppetDB (239 A,232 PTR, 27 CNAME; 490 unique fqdn/type/value) and
dig'd each against the k8sauthoritative read endpoint
198.18.200.7(the dynamic path's serving side):Both non-match buckets are accounted for and are not coverage gaps:
profiles::dns::updater::deny_ranges(
198.18.200.0/24,10.42.0.0/16, ...) plus reverse zones the authoritativecluster isn't even authoritative for:
*-kube-lb0(198.18.200.x),*-flannel.1(10.42.x.x pod CIDR), and*-nomad/*-brcom1(172.26.64.x / 10.255.255.x). These are exactly the k8s/LB noise the deny
ranges exist to keep out of the authoritative zones. Verified every one falls
in a denied/non-authoritative range.
correctly:
au-syd1-prod-halb.main.unkin.netA: four ceph nodes (2069-2073) eachself-register the shared name with their own primary IP (haproxy::dns
exports
networking.ipper host, a legacy collision). Dynamic resolves it tothe single VIP
198.18.24.60.dashboard.ceph.unkin.netCNAME: the ceph node self-publishes this tolb1.unkin.net.via its own nsupdate (per the k8s zones.yaml note); theexported VRRP-name fragment is stale.
Conclusion: the dynamic path fully covers the served record set, and the serving
path no longer depends on the exported files.
Collector-behavior note (what the flip actually does)
profiles::dns::zonerealizes the fragments with an exported-resource collector(
Concat::Fragment <<| target == ... |>>). Turning off export purges thefragments from PuppetDB, so on the VM master concat rebuilds each
/var/named/sources/<zone>.confdown to just the header (SOA+NS+glue) as nodesconverge. That is cosmetic: no client resolves against the VM master anymore
(#490), and the k8s authoritative zones are unaffected (fed by nsupdate, not
these files).
Rollback
Set
profiles::dns::updater::manage_export: trueagain and let puppet converge;nodes re-export their fragments and the VM-master zone files repopulate.
Follow-up (after soak)
Deleting the
@@concat::fragment/Concat::Fragment <<||>>collector code inprofiles::dns::record/profiles::dns::zone(and the VMprofiles::dns::masterzone assembly) is a separate cleanup PR once this has soaked and the VM master is
confirmed decommissionable.