Debian trixie ships pdns-recursor 5.2.13, and 5.x does not accept the old key=value recursor.conf that VyOS generates any more. The service stops at start with:
Old-style settings syntax not supported by default anymore Convert to YAML settings. If not feasible use --enable-old-settings on the command line. This option will be removed in a future release.
Debian's NEWS for 5.2.0-4 says the same ("The configuration file syntax has changed from the old key=value format to YAML. You must manually migrate, otherwise the service fails to (re-)start."). --enable-old-settings is only a stopgap.
A second change comes with the same package: /usr/share/pdns-recursor/lua-config/rootkeys.lua is not shipped any more (it was a Debian-specific file with the line readTrustAnchorsFromFile("/usr/share/dns/root.key")). recursor.conf.lua.j2 loads it with dofile(...), so the Lua configuration fails. The recursor has the DNSSEC root key built in, and dnssec.trustanchorfile can point at /usr/share/dns/root.key to keep following the key of dns-root-data.
Why this matters beyond the base change: pdns-recursor 4.8.8 in bookworm is end of life upstream, and 5.2.13 in trixie already contains the /etc/hosts fix of T9489 and fixes for most of the CVEs that are open for 4.8.8 in the Debian tracker.
Scope
- data/templates/dns-forwarding/recursor.conf.j2: render YAML (recursor.yml) instead of key=value.
- data/templates/dns-forwarding/recursor.conf.lua.j2: drop the rootkeys.lua line, use dnssec.trustanchorfile or the built-in key.
- recursor.forward-zones.conf.j2 and vyos-hostsd: the forward zones file written by vyos-hostsd, and the Lua file with the names from DHCP and static-host-mapping.
- src/conf_mode/service_dns_forwarding.py: file names and the systemd override (--config-dir).
- smoketest/scripts/cli/test_service_dns_forwarding.py: it reads lines of the generated configuration today.
rec_control show-yaml --config-dir=/run/pdns-recursor converts the current generated files without errors on 5.4.7. That gives the mapping, for example allow-from to incoming.allow_from, local-address to incoming.listen, dnssec=validate to dnssec.validation, max-cache-entries to recordcache.max_entries, query-local-address to outgoing.source_address, forward-zones-file to recursor.forward_zones_file.
Constraint
YAML settings exist only in 5.x. The change can only be merged together with the Debian trixie base (or with a version check that renders the old format for 4.x). I would prefer the first, so the old format can go away.
Test plan
Develop and test against 5.4.7 on a VM, and against 5.2.13 once the trixie image is available. The smoketest has to pass on both.