PowerDNS / pdns

PowerDNS Authoritative, PowerDNS Recursor, dnsdist
https://www.powerdns.com/
GNU General Public License v2.0
3.67k stars 907 forks source link

Authoritative slave w/ bindbackend reports confusing error for new zones (yet works fine) #7638

Open gertvdijk opened 5 years ago

gertvdijk commented 5 years ago

Short description

The Bind zone file backend on a slave reports "error" for new domains, while everything is actually OK.

Environment

Steps to reproduce

  1. Set up a master authoritative server, allow AXFR etc.
  2. Connect a slave with the BIND backend. e.g. with a bindbackend.conf such as:
    zone "mydomain.tld" {
        type slave;
        file "mydomain.tld.db";
        masters { 10.1.2.3; };
    };
  3. The slave will now start the initial AXFR for the new zone.
  4. The logs indicate OK in the end, but note the error on line 3.

    [bindbackend] Parsing 1 domain(s), will report when done
    Master/slave communicator launching
    [bindbackend] error at 2019-03-28 16:23:18 +0000 no file found for new slave domain 'mydomain.tld'. Has not been AXFR'd yet
    [bindbackend] Done parsing domains, 1 rejected, 1 new, 0 removed
    About to create 3 backend threads for UDP
    1 slave domain needs checking, 0 queued for AXFR
    Received serial number updates for 1 zone, had 0 timeouts
    Domain 'mydomain.tld' is stale, master serial 1, our serial 0
    Initiating transfer of 'mydomain.tld' from remote '10.1.2.3'
    Starting AXFR of 'mydomain.tld' from remote 10.1.2.3:53
    AXFR started for 'mydomain.tld'
    AXFR of 'mydomain.tld' from remote 10.1.2.3:53 done
    Backend transaction started for 'mydomain.tld' storage
    Zone 'mydomain.tld' (bind-zones/mydomain.tld.db) reloaded
    AXFR done for 'mydomain.tld', zone committed with serial number 1
    Done launching threads, ready to distribute questions

Expected behaviour

Not report an error for a precondition that's not met by expectation as indicated in the same line (Has not been AXFR'd yet).

Actual behaviour

Unnecessary "error" message that indicates this it is fine:

[bindbackend] error at \<time> no file found for new slave domain 'mydomain.tld'. Has not been AXFR'd yet

Other information

n/a, explained in previous sections.

gertvdijk commented 5 years ago

Oh, I just found #3051 (#2405), which should have fixed it. Is it a regression?