<div dir="ltr">Hi list,<div><br></div><div>I came across a very strange problem with my powerdns installation. As info, I'm using powredns since some years now, started with replacing bind slaves with pdns. No I finally got to replace the last bind based one, my master/slave server.</div><div class="gmail-cye-lm-tag"><br></div><div class="gmail-cye-lm-tag gmail-cye-lm-tag gmail-cye-lm-tag gmail-cye-lm-tag gmail-cye-lm-tag gmail-cye-lm-tag"><div>p-dns:~ # pdns_server --version</div><div>Jul 26 11:54:46 PowerDNS Authoritative Server 4.1.3 (C) 2001-2018 PowerDNS.COM BV</div><div class="gmail-cye-lm-tag"><br></div><div class="gmail-cye-lm-tag">It is configured as master and slave, since it's hosting some zones as hidden primary. Because of some customers with lots of domains sharing the same bind zonefile, I have set up the system to both bind backend and gmysql backend.</div><div class="gmail-cye-lm-tag"><br></div><div class="gmail-cye-lm-tag">So, I got a zone where the serial doesn't do what it should. Please see here:</div><div class="gmail-cye-lm-tag"><br></div><div class="gmail-cye-lm-tag">The value returned from the real primary:</div><div class="gmail-cye-lm-tag"><div class="gmail-cye-lm-tag">freddy@hades ~ % dig +short +noshort <a href="http://floppysheep.com">floppysheep.com</a> soa @<a href="http://koef.zs64.net">koef.zs64.net</a></div><div class="gmail-cye-lm-tag"><a href="http://floppysheep.com">floppysheep.com</a>.<span style="white-space:pre" class="gmail-cye-lm-tag gmail-cye-lm-tag gmail-cye-lm-tag gmail-cye-lm-tag gmail-cye-lm-tag">        </span>432000<span style="white-space:pre" class="gmail-cye-lm-tag gmail-cye-lm-tag gmail-cye-lm-tag gmail-cye-lm-tag gmail-cye-lm-tag">        </span>IN<span style="white-space:pre" class="gmail-cye-lm-tag gmail-cye-lm-tag gmail-cye-lm-tag gmail-cye-lm-tag gmail-cye-lm-tag">    </span>SOA<span style="white-space:pre" class="gmail-cye-lm-tag gmail-cye-lm-tag gmail-cye-lm-tag gmail-cye-lm-tag gmail-cye-lm-tag">   </span><a href="http://koef.zs64.net">koef.zs64.net</a>. <a href="http://hostmaster.zs64.net">hostmaster.zs64.net</a>. 2018072400 86400 3600 3888000 300</div><div><br></div></div><div class="gmail-cye-lm-tag">The value returned from the hidden primary:</div><div class="gmail-cye-lm-tag gmail-cye-lm-tag gmail-cye-lm-tag gmail-cye-lm-tag gmail-cye-lm-tag gmail-cye-lm-tag"><div class="gmail-cye-lm-tag">freddy@hades ~ % dig +short +noshort <a href="http://floppysheep.com">floppysheep.com</a> soa @<a href="http://p-dns.irz42.net">p-dns.irz42.net</a></div><div class="gmail-cye-lm-tag gmail-cye-lm-tag"><a href="http://floppysheep.com">floppysheep.com</a>.<span style="white-space:pre" class="gmail-cye-lm-tag gmail-cye-lm-tag gmail-cye-lm-tag gmail-cye-lm-tag gmail-cye-lm-tag">     </span>432000<span style="white-space:pre" class="gmail-cye-lm-tag gmail-cye-lm-tag gmail-cye-lm-tag gmail-cye-lm-tag gmail-cye-lm-tag">        </span>IN<span style="white-space:pre" class="gmail-cye-lm-tag gmail-cye-lm-tag gmail-cye-lm-tag gmail-cye-lm-tag gmail-cye-lm-tag">    </span>SOA<span style="white-space:pre" class="gmail-cye-lm-tag gmail-cye-lm-tag gmail-cye-lm-tag gmail-cye-lm-tag gmail-cye-lm-tag">   </span><a href="http://koef.zs64.net">koef.zs64.net</a>. <a href="http://hostmaster.zs64.net">hostmaster.zs64.net</a>. 2018072601 86400 3600 3888000 300</div><div class="gmail-cye-lm-tag"><br></div><div class="gmail-cye-lm-tag">The value returned from the second slave (directly syncing from the real primary):</div><div class="gmail-cye-lm-tag gmail-cye-lm-tag gmail-cye-lm-tag gmail-cye-lm-tag"><div class="gmail-cye-lm-tag">freddy@hades ~ % dig +short +noshort <a href="http://floppysheep.com">floppysheep.com</a> soa @<a href="http://s-dns.irz42.net">s-dns.irz42.net</a></div><div class="gmail-cye-lm-tag gmail-cye-lm-tag"><a href="http://floppysheep.com">floppysheep.com</a>.<span style="white-space:pre" class="gmail-cye-lm-tag gmail-cye-lm-tag gmail-cye-lm-tag gmail-cye-lm-tag">  </span>432000<span style="white-space:pre" class="gmail-cye-lm-tag gmail-cye-lm-tag gmail-cye-lm-tag gmail-cye-lm-tag"> </span>IN<span style="white-space:pre" class="gmail-cye-lm-tag gmail-cye-lm-tag gmail-cye-lm-tag gmail-cye-lm-tag">     </span>SOA<span style="white-space:pre" class="gmail-cye-lm-tag gmail-cye-lm-tag gmail-cye-lm-tag gmail-cye-lm-tag">    </span><a href="http://koef.zs64.net">koef.zs64.net</a>. <a href="http://hostmaster.zs64.net">hostmaster.zs64.net</a>. 2018072400 86400 3600 3888000 300</div><div><br></div><div><br></div><div>As you see, both the master and the second slave have 2018072400 as serial, but the hidden primary has the serial 2018072601.</div><div><br></div><div>The problem is, I have no clue where this serial is coming from. The domain is configured via bind backend so the serial has to come from the zonefile itself, but it isn't:</div><div><br></div><div><div>p-dns:~ # grep SOA /var/named/slave/<a href="http://floppysheep.com">floppysheep.com</a> </div><div>@<span style="white-space:pre" class="gmail-cye-lm-tag gmail-cye-lm-tag"> </span>432000<span style="white-space:pre" class="gmail-cye-lm-tag gmail-cye-lm-tag">   </span>SOA<span style="white-space:pre" class="gmail-cye-lm-tag gmail-cye-lm-tag">      </span><a href="http://koef.zs64.net">koef.zs64.net</a>. <a href="http://hostmaster.zs64.net">hostmaster.zs64.net</a>. 2018072400 86400 3600 3888000 300</div></div><div class="gmail-cye-lm-tag"><br></div><div class="gmail-cye-lm-tag">So it seems that pdns silently rewrites the serial value for whatever reason.</div><div><br></div><div>Any idea where this serial comes from?</div><div class="gmail-cye-lm-tag gmail-cye-lm-tag"><br></div><div class="gmail-cye-lm-tag gmail-cye-lm-tag">While writing this email I had another little idea and checked my config.</div><div class="gmail-cye-lm-tag">I have these configured:</div><div class="gmail-cye-lm-tag gmail-cye-lm-tag"><br></div><div class="gmail-cye-lm-tag gmail-cye-lm-tag"><div class="gmail-cye-lm-tag">p-dns:~ # egrep -i 'soa|serial' /etc/pdns/pdns.conf | grep -v '^#'</div><div class="gmail-cye-lm-tag">axfr-lower-serial=yes</div><div class="gmail-cye-lm-tag">default-soa-edit=INCEPTION-INCREMENT</div><div class="gmail-cye-lm-tag">default-soa-edit-signed=INCEPTION-INCREMENT</div><div class="gmail-cye-lm-tag"><br></div><div class="gmail-cye-lm-tag gmail-cye-lm-tag">but according to the docs, I don't see them in charge for this. Interestingly, when disabling these, the SOA records for the zone are returned exactly like they are configured in the zone file. When re-enabling these, the SOA record jumps back on 2018072601.<br><br>So, why is this?<br>If I understood correctly, I need INCEPTION-INCREMENT to make sure that changes on the sql zones get saved with a new serial without having to 'pdnsutil increase-serial' every time. But when this setting makes my bind zones return wrong serials I don't see how I can live with that variable setting...</div><div class="gmail-cye-lm-tag gmail-cye-lm-tag"><br></div><div class="gmail-cye-lm-tag gmail-cye-lm-tag"><br></div></div><div class="gmail-cye-lm-tag"><br></div></div></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>with kind regards</div><div><br>        Frank Altpeter</div><div><br>-- </div><div><div>FA-RIPE || <a href="https://about.me/frank.altpeter/" target="_blank">https://about.me/frank.altpeter/</a></div><div><br></div></div></div></div></div></div>