pdns
pdns copied to clipboard
Increase serial is ineffective when zone is in INCEPTION-INCREMENT mode
- [X] This is not a support question, I have read about opensource and will send support questions to the IRC channel, Github Discussions or the mailing list.
- [X] I have read and understood the 'out in the open' support policy
- Program: Authoritative
- Issue type: Bug report
Short description
When using SOA-EDIT: INCEPTION-INCREMENT mode and pdns-util edit-zone prompts to increase the SOA serial for you, a serial update happens but it is done in a way that is typically ineffective.
Issue being that for INCEPTION-INCREMENT, when pdns constructs the active SOA it effectively uses something along the lines of MAX(SOA.SERIAL, INCEPTIONDATE) for the serial (not the SOA.SERIAL from the backend as-is).
However, the "increase-serial" operation seems to end up just bumping the existing serial by one despite being in INCEPTION-INCREMENT mode, without touching the "YYYYMMDD" portion, leaving behind a brand new serial that still compares as lower compared to the inception date.
This in turn means that the relatively static inception-based serial is still favored despite the zone being actively updated, and as such no transfers happening from secondaries.
Reporting this on behalf of other raising this in #pdns. It looks to me that the code indeed only effectively does +1, which seems to fit the problem description perfectly.
Environment
- Operating system: ?
- Software version: I believe it was reported for 4.7 but looking at the code, this seems to remain in master?
- Software source: ?
Steps to reproduce
- Have a test.example zone with SOA.SERIAL < inception date and SOA-EDIT INCEPTION-INCREMENT
- Check the visible serial via eg
dig @127.0.0.1 test.example SOA(should show inception) pdnsutil edit-zone test.example, make some change and choose yes- Check the visible serial via
dig @127.0.0.1 test.example SOA
Expected behaviour
The queryable SOA.SERIAL should increase
Actual behaviour
The queryable SOA.SERIAL remains unchanged (at the inception date, but the serial in the backend was bumped by 1)