feat(dns): add native PowerDNS secondary replication - #1667
Conversation
What: three real bugs found while reproducing the failing UI/NATS/DNS integration simulation on lancache-229: the validation compose fixture's DDNS_TSIG_KEY was a plain string, not valid base64 (pdnsutil's TSIG import needs real key material); the primary never set allow-axfr-ips, so PowerDNS's loopback-only default REFUSED every secondary's AXFR regardless of a valid TSIG; and the simulation only gave dns-ssl 10s to see a change, shorter than PDNS_XFR_CYCLE_INTERVAL's own 15s default. Why: confirmed empirically (2026-08-24, lancache-229, manual compose reproduction) that fixing the TSIG format alone let the zone actually transfer, just past the test's 10s window; allow-axfr-ips derives from DNS_XFR_NOTIFY_TARGETS via the existing dns_xfr_primary_endpoint() resolver, matching PDNS_ALLOW_NOTIFY_FROM's own pattern. From: Issue #1164
|
Reproduced the failing
Still open, not resolved by the above: with all three fixes in place (TSIG valid, |
Summary
dns-standardanddns-sslpair sodns-standardis the single local writer anddns-sslreceives TSIG-protected AXFR/NOTIFY updates.NATS_RECORD_WRITES=0.Refs #1164
Impact
Validation
git diff --checkbash -n services/dns/entrypoint.sh services/dhcp/entrypoint.sh setup.sh tests/bats/helpers/dns-ddns-tsig-helpers.sh tests/bats/dns_ddns_tsig_revoke.batscargo fmt --manifest-path services/dns/nats-subscriber/Cargo.toml -- --checkcargo fmt --manifest-path services/ui/Cargo.toml -- --check2757daa:bash scripts/tracked/check-file-headers.shbash scripts/untracked/check-workflow-line-limit.shtimeout --kill-after=30 300 bash scripts/untracked/check-review-chronology-comments.shcargo fmt --manifest-path services/dns/nats-subscriber/Cargo.toml -- --checkcargo fmt --manifest-path services/ui/Cargo.toml -- --checkfind . \( -name "*.sh" -o -name "*.bats" \) ... | xargs shellcheck --severity=warningactionlint .github/workflows/*.ymlbats tests/bats/dhcp_kea_config_generation.bats tests/bats/setup_secondary_docker_compose.bats tests/bats/dns_ddns_tsig_revoke.bats(46/46passed)cargo test --quiet --manifest-path services/dns/nats-subscriber/Cargo.toml record_write_mode_disables_common_false_spellingscargo test --quiet --manifest-path services/ui/Cargo.toml register_response_serializes_image_tag_for_secondary_setupdocker compose config --quietwith CI validation env fordeploy/prod,deploy/quickstart,deploy/full-setup, anddeploy/secondaryfinal-temp-clean).Risk
DNS_XFR_NOTIFY_TARGETSrely on PowerDNS refresh polling for convergence.5.0.7-r0while upstream stable was observed at5.1.4; this PR does not change the PowerDNS package version.Follow-up
AGENTS.md Compliance Notes
services/dns/entrypoint.sh,configure_ddns_tsig,cmd_secondary, and the existing Bats helper-extraction pattern.