Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve slave-check: Check every configured master and AXFR from mast… #4956

Closed
wants to merge 0 commits into from

Conversation

klaus3000
Copy link

@klaus3000 klaus3000 commented Jan 30, 2017

…er with highest serial

Currently PDNS as slave has a poor logic when there are multiple masters:

  1. On incoming NOTIFY, PDNS queues the zone for refresh. Then, the SOA query uses a
    random master to get the master's serial. On timeout, PDNS does not try another master.

  2. If the SOA query was successful and the serial increased, PDNS queues the domain for
    AXFR, but this AXFR uses only the first master.

Thus, if the first master is offline, even if the second master sends
NOTIFYs and has a newer zone, PDNS will never transfer it.

This patch does 2 things:

a) If a slave check for a domain is requested and the domain has multiple masters, the SOA
check will be performed against every master.
b) Further, the name server which answered with
the highest serial will be used for the AXFR.

Known issue: If there is a serial rollover, then choosing the highest serial is not the best
choice. But as soon as the rollover happend on every master the logic is correct again.

This pull request needs some more polishing (eg. replace some log messages with DLOG), but I wanted to ask first if you would accept this.

The same patch for 3.4 is running in production since ~1 year with nearly 1mio slave domains without problems.

@klaus3000
Copy link
Author

The patch did not worked with current master any more. I wanted to update the patch but during this the PR was automatically closed. Hence I opened a new one: #5595

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants