pdns icon indicating copy to clipboard operation
pdns copied to clipboard

Increase serial is ineffective when zone is in INCEPTION-INCREMENT mode

Open hlindqvist opened this issue 1 year ago • 0 comments

  • 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

  1. Have a test.example zone with SOA.SERIAL < inception date and SOA-EDIT INCEPTION-INCREMENT
  2. Check the visible serial via eg dig @127.0.0.1 test.example SOA (should show inception)
  3. pdnsutil edit-zone test.example, make some change and choose yes
  4. 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)

Other information

hlindqvist avatar Dec 01 '23 14:12 hlindqvist