Fix cobbler CNAME target to be fully-qualified

The cobbler master exports cobbler.main.unkin.net as a CNAME whose value
is the bare hostname. BIND's legacy zone-file load completes that against
$ORIGIN, but dns-updater renders RFC2136 updates with no $ORIGIN, so the
bare label becomes root-absolute (ausyd1nxvm2098.) and dead-ends in
NXDOMAIN on the k8s authoritative/resolvers. Qualify the target so both
publish paths resolve identically.
This commit is contained in:
2026-07-20 23:13:13 +10:00
parent e8443ccfa1
commit b4d70d6008
+4 -1
View File
@@ -68,7 +68,10 @@ class profiles::cobbler::config {
# export cnames for cobbler # export cnames for cobbler
if $is_cobbler_master { if $is_cobbler_master {
profiles::dns::record { "${::facts['networking']['fqdn']}_${service_cname}_CNAME": profiles::dns::record { "${::facts['networking']['fqdn']}_${service_cname}_CNAME":
value => $::facts['networking']['hostname'], # CNAME target must be a fully-qualified name (trailing dot): dns-updater
# parses the value with no $ORIGIN, so a bare label becomes root-absolute
# ("ausyd1nxvm2098.") and dead-ends in NXDOMAIN.
value => "${::facts['networking']['fqdn']}.",
type => 'CNAME', type => 'CNAME',
record => "${service_cname}.", record => "${service_cname}.",
zone => $::facts['networking']['domain'], zone => $::facts['networking']['domain'],