Centos – PowerDNS, updating serial

centosdomain-name-systempowerdns

I recently wrote script that automatically enteres new Sub Domain records into the PDS mySql database. Now if I enter the entry mannually using Zone Admin my sub domain works 100%. Now if I add it using a simply SQL insert string eg "insert into records (domain_id, name,type,content,ttl,prio) values("; it does not work, I got told that I need to update the SOA serial which I do but it just does not want to take effect. I do the following date(Ymd)."01" and this does not work, any suggestions will be greatly appreciated

Best Answer

Alex and Roland, with the gmysql backend or any other RDBMS backend you do not need to issue any reload commands, PowerDNS will know the zone has changed by looking at the serial value in the corresponding SOA record.

The SOA serial number needs to be bumped up, meaning it needs to be now > then in order for PowerDNS to notify it's slaves about changes, hence if you overwrite YYYYMMDD01 with YYYYMMDD01 that will not cut it.

Also note that PowerDNS will send NOTIFYs to all nameservers specified by NS records for a given domain entry, however it will only do so if it's run in master mode. i.e. master=yes in pdns.conf, the default is NATIVE mode where it assumes that backend data is synced in the background by mysql replication or other means.

http://doc.powerdns.com/generic-mypgsql-backends.html#AEN5985

You can visit us on #powerdns @ irc.oftc.net btw.

Related Topic