[Pdns-users] Glue-Records in PowerDNS 3.x

Marten Lehmann lehmann at cnm.de
Thu Dec 13 00:35:56 UTC 2012


Hello,

we recently upgraded from PowerDNS 2.9.21 to 3.1 and noticed a different 
handling of subdomains within subdomains, that contain NS-records.

Let me show an example for the zone domain.com, which has an entry in 
the domains table (its a NATIVE zone) and its records in the records 
table related by the domain_id.

domain.com A 1.2.3.4
www.domain.com A 2.3.4.5
sub.domain.com NS whatever.com
www.sub.domain.com A 3.4.5.6

domain.com and www.domain.com resolve as expected in both releases. When 
queried for www.sub.domain.com, in release 2.9.21 PowerDNS responds with 
3.4.5.6 . In version 3.1 it doesn't find a A record.

Interestingly, in 3.1 it responds with a SOA record for sub.domain.com, 
meaning that by just having inserted an NS-record for a sub.domain.com, 
PowerDNS creates a virtual SOA record (there is no SOA-record in the 
records table for sub.domain.com) and doesn't look for 
www.sub.domain.com in the same zone any longer. It probably fails 
because it tries to lookup sub.domain.com again in the domains table but 
doesn't find a record (we didn't create a separate zone for it) so it 
doesn't resolve at all instead of using the record within the domain.com 
zone.

Thats especially complicated for glue records within subdomains of a 
larger domain. However, there is no problem with this simpler situation. 
Lets say we again have the zone domain.com:

domain.com NS ns1.domain.com
domain.com NS ns2.domain.com
ns1.domain.com A 1.2.3.4
ns2.domain.com A 2.3.4.5

Having explained the problem above, one would expect, that PowerDNS 3.1 
won't show A-records for ns1/ns2.domain.com and you have to create 
separate zones for ns1.domain.com and ns2.domain.com instead. But it 
does resolve in this case, possibly because it finds the domain.com zone 
in the domains table, whereas it didn't find a sub.domain.com zone in 
the above example.

Kind regards
Marten



More information about the Pdns-users mailing list