[Pdns-users] NULL type and content fields in Database after axfr

Thomas Mieslinger miesi at pc-h.de
Fri Sep 13 13:41:13 UTC 2013


Hi,

I'm using
> Sep 13 15:26:46 PowerDNS Authoritative Server 3.3 (jenkins at autotest.powerdns.com) (C) 2001-2013 PowerDNS.COM BV
> Sep 13 15:26:46 Using 64-bits mode. Built on 20130717102032 by root at lxjjungermann.united.domain, gcc 4.4.5.
> Sep 13 15:26:46 PowerDNS comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it according to the terms of the GPL version 2.

I just noticed that an axfr (example:)

> dig axfr die-optimisten.net
> ;; global options: +cmd
> die-optimisten.net.	86400	IN	SOA	ns-gmx.ui-dns.org. hostmaster.gmx.net. 2012120600 28800 7200 604800 86400
> die-optimisten.net.	86400	IN	NS	ns-gmx.ui-dns.org.
> die-optimisten.net.	86400	IN	NS	ns-gmx.ui-dns.com.
> die-optimisten.net.	86400	IN	NS	ns-gmx.ui-dns.de.
> die-optimisten.net.	86400	IN	NS	ns-gmx.ui-dns.biz.
> die-optimisten.net.	86400	IN	A	213.165.65.50
> die-optimisten.net.	86400	IN	MX	10 mx00.gmx.net.
> die-optimisten.net.	86400	IN	MX	10 mx01.gmx.net.
> die-optimisten.net.	86400	IN	TXT	"v=spf1 redirect=gmx.net"
> _jabber._tcp.die-optimisten.net. 86400 IN SRV	5 0 5269 jabber.gmx.net.
> _xmpp-client._tcp.die-optimisten.net. 86400 IN SRV 5 0 5222 jabber.gmx.net.
> _xmpp-server._tcp.die-optimisten.net. 86400 IN SRV 5 0 5269 jabber.gmx.net.
> imap.die-optimisten.net. 86400	IN	CNAME	imap.gmx.net.
> localhost.die-optimisten.net. 86400 IN	A	127.0.0.1
> mail.die-optimisten.net. 86400	IN	CNAME	mail.gmx.net.
> pop.die-optimisten.net.	86400	IN	CNAME	pop.gmx.net.
> smtp.die-optimisten.net. 86400	IN	CNAME	smtp.gmx.net.
> www.die-optimisten.net.	86400	IN	CNAME	service.gmx.net.
> die-optimisten.net.	86400	IN	SOA	ns-gmx.ui-dns.org. hostmaster.gmx.net. 2012120600 28800 7200 604800 86400
> ;; Query time: 2 msec

I cleaned the zone with

delete from where

and did a

pdns_control retrieve die-optimisten.net

Now the zone looks in the mysql database like this:

> mysql> select * from records where domain_id=2734;
> +-----------+-----------+--------------------------------------+-------+---------------------------------------------------------------------------+-------+------+---------------------+
> | id        | domain_id | name                                 | type  | content                                                                   | ttl   | prio | change_date         |
> +-----------+-----------+--------------------------------------+-------+---------------------------------------------------------------------------+-------+------+---------------------+
> | 160510146 |      2734 | die-optimisten.net                   | SOA   | ns-gmx.ui-dns.org. hostmaster.gmx.net. 2012120600 28800 7200 604800 86400 | 86400 |    0 | 2013-09-13 15:30:08 |
> | 160510147 |      2734 | die-optimisten.net                   | NS    | ns-gmx.ui-dns.org                                                         | 86400 |    0 | 2013-09-13 15:30:08 |
> | 160510148 |      2734 | die-optimisten.net                   | NS    | ns-gmx.ui-dns.com                                                         | 86400 |    0 | 2013-09-13 15:30:08 |
> | 160510149 |      2734 | die-optimisten.net                   | NS    | ns-gmx.ui-dns.de                                                          | 86400 |    0 | 2013-09-13 15:30:08 |
> | 160510150 |      2734 | die-optimisten.net                   | NS    | ns-gmx.ui-dns.biz                                                         | 86400 |    0 | 2013-09-13 15:30:08 |
> | 160510151 |      2734 | die-optimisten.net                   | A     | 213.165.65.50                                                             | 86400 |    0 | 2013-09-13 15:30:08 |
> | 160510152 |      2734 | die-optimisten.net                   | MX    | mx00.gmx.net                                                              | 86400 |   10 | 2013-09-13 15:30:08 |
> | 160510153 |      2734 | die-optimisten.net                   | MX    | mx01.gmx.net                                                              | 86400 |   10 | 2013-09-13 15:30:08 |
> | 160510154 |      2734 | die-optimisten.net                   | TXT   | "v=spf1 redirect=gmx.net"                                                 | 86400 |    0 | 2013-09-13 15:30:08 |
> | 160510155 |      2734 | _jabber._tcp.die-optimisten.net      | SRV   | 0 5269 jabber.gmx.net                                                     | 86400 |    5 | 2013-09-13 15:30:08 |
> | 160510156 |      2734 | _xmpp-client._tcp.die-optimisten.net | SRV   | 0 5222 jabber.gmx.net                                                     | 86400 |    5 | 2013-09-13 15:30:08 |
> | 160510157 |      2734 | _xmpp-server._tcp.die-optimisten.net | SRV   | 0 5269 jabber.gmx.net                                                     | 86400 |    5 | 2013-09-13 15:30:08 |
> | 160510158 |      2734 | imap.die-optimisten.net              | CNAME | imap.gmx.net                                                              | 86400 |    0 | 2013-09-13 15:30:08 |
> | 160510159 |      2734 | localhost.die-optimisten.net         | A     | 127.0.0.1                                                                 | 86400 |    0 | 2013-09-13 15:30:08 |
> | 160510160 |      2734 | mail.die-optimisten.net              | CNAME | mail.gmx.net                                                              | 86400 |    0 | 2013-09-13 15:30:08 |
> | 160510161 |      2734 | pop.die-optimisten.net               | CNAME | pop.gmx.net                                                               | 86400 |    0 | 2013-09-13 15:30:08 |
> | 160510162 |      2734 | smtp.die-optimisten.net              | CNAME | smtp.gmx.net                                                              | 86400 |    0 | 2013-09-13 15:30:08 |
> | 160510163 |      2734 | www.die-optimisten.net               | CNAME | service.gmx.net                                                           | 86400 |    0 | 2013-09-13 15:30:08 |
> | 160510164 |      2734 | _tcp.die-optimisten.net              | NULL  | NULL                                                                      |  NULL | NULL | 2013-09-13 15:30:08 |
> +-----------+-----------+--------------------------------------+-------+---------------------------------------------------------------------------+-------+------+---------------------+
> 19 rows in set (0.01 sec)

You see record id 160510164.

It wasn't in the axfr. I have longer zones with 20 to 40 NULL records 
which are duplicates of real names. As long as the type is NULL the 
select will probably not return them to powerdns, But  select * from 
records where type is null; returns 12561 rows :-(

How do I stop this?

Thomas




More information about the Pdns-users mailing list