PowerDNS / pdns

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

pdnsutil doesn't like duplicate domain-id's in different backends #7317

Open RvdE opened 5 years ago

RvdE commented 5 years ago

Short description

Starting with auth 4.2.0-alpha1 pdnsutil throws errors about duplicate domain-id's from different backends.

Environment

Steps to reproduce

  1. pdnsutil check-all-zones

Expected behaviour

[(Thu Jan 03 13:34) root@lan ~]# pdnsutil check-all-zones Checked 3 records of '0.0.127.in-addr.arpa', 0 errors, 0 warnings. Checked 3 records of 'box', 0 errors, 0 warnings. Checked 4 records of '1.168.192.in-addr.arpa', 0 errors, 0 warnings. Checked 22 records of 'no-substitute.com', 0 errors, 0 warnings. Checked 21 records of 'no-substitute.org', 0 errors, 0 warnings. Checked 34 records of 'c.d.6.4.0.8.9.0.1.0.0.2.ip6.arpa', 0 errors, 0 warnings. Checked 3 records of 'repeater', 0 errors, 0 warnings. Checked 3 records of '0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa', 0 errors, 0 warnings. Checked 12 records of 'satisfaction.nl.eu.org', 0 errors, 0 warnings. Checked 23 records of '0.168.192.in-addr.arpa', 0 errors, 0 warnings. Checked 10 records of 'the-imminent-storm.nl.eu.org', 0 errors, 0 warnings. Checked 10 records of 'scharlaken-leeuw.nl.eu.org', 0 errors, 0 warnings. Checked 82 records of 'cainites.net', 0 errors, 0 warnings. Checked 11 records of 'final-destination.nl.eu.org', 0 errors, 0 warnings. Checked 20 records of 'somara.nl', 0 errors, 0 warnings. Checked 26 records of 'ariejoost.nl', 0 errors, 0 warnings. Checked 20 records of 'kimindepen.nl', 0 errors, 0 warnings. Checked 18 records of 'kimbergshoeff.nl', 0 errors, 0 warnings. Checked 7 records of 'starwars.nl.eu.org', 0 errors, 0 warnings. Checked 19 records of 'thanigul.nl', 0 errors, 0 warnings. Checked 19 records of 'sportschoolkwikkers.nl', 0 errors, 0 warnings. Checked 19 records of 'thanigulgym.nl', 0 errors, 0 warnings. Checked 19 records of 'kimenarjo.nl', 0 errors, 0 warnings. Checked 23 zones, 0 had errors.

Actual behaviour

[(Thu Jan 03 13:55) root@lan ~]# pdnsutil check-all-zones Checked 3 records of '0.0.127.in-addr.arpa', 0 errors, 0 warnings. Checked 3 records of 'box', 0 errors, 0 warnings. Checked 4 records of '1.168.192.in-addr.arpa', 0 errors, 0 warnings. Checked 22 records of 'no-substitute.com', 0 errors, 0 warnings. Checked 21 records of 'no-substitute.org', 0 errors, 0 warnings. Checked 34 records of 'c.d.6.4.0.8.9.0.1.0.0.2.ip6.arpa', 0 errors, 0 warnings. Checked 3 records of 'repeater', 0 errors, 0 warnings. Checked 3 records of '0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa', 0 errors, 0 warnings. Checked 12 records of 'satisfaction.nl.eu.org', 0 errors, 0 warnings. Checked 23 records of '0.168.192.in-addr.arpa', 0 errors, 0 warnings. Checked 10 records of 'the-imminent-storm.nl.eu.org', 0 errors, 0 warnings. Checked 10 records of 'scharlaken-leeuw.nl.eu.org', 0 errors, 0 warnings. Checked 82 records of 'cainites.net', 0 errors, 0 warnings. Checked 11 records of 'final-destination.nl.eu.org', 0 errors, 0 warnings. Checked 20 records of 'somara.nl', 0 errors, 0 warnings. [Error] Domain ID 2 of 'somara.nl' in backend gmysql has already been used by zone 'scharlaken-leeuw.nl.eu.org' in backend gpgsql. Checked 26 records of 'ariejoost.nl', 0 errors, 0 warnings. Checked 20 records of 'kimindepen.nl', 0 errors, 0 warnings. [Error] Domain ID 4 of 'kimindepen.nl' in backend gmysql has already been used by zone '0.0.127.in-addr.arpa' in backend gpgsql. Checked 18 records of 'kimbergshoeff.nl', 0 errors, 0 warnings. [Error] Domain ID 5 of 'kimbergshoeff.nl' in backend gmysql has already been used by zone '0.168.192.in-addr.arpa' in backend gpgsql. Checked 7 records of 'starwars.nl.eu.org', 0 errors, 0 warnings. [Error] Domain ID 10 of 'starwars.nl.eu.org' in backend gmysql has already been used by zone 'no-substitute.org' in backend gpgsql. Checked 19 records of 'thanigul.nl', 0 errors, 0 warnings. [Error] Domain ID 11 of 'thanigul.nl' in backend gmysql has already been used by zone 'satisfaction.nl.eu.org' in backend gpgsql. Checked 19 records of 'sportschoolkwikkers.nl', 0 errors, 0 warnings. [Error] Domain ID 13 of 'sportschoolkwikkers.nl' in backend gmysql has already been used by zone '0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa' in backend gpgsql. Checked 19 records of 'thanigulgym.nl', 0 errors, 0 warnings. [Error] Domain ID 14 of 'thanigulgym.nl' in backend gmysql has already been used by zone 'the-imminent-storm.nl.eu.org' in backend gpgsql. Checked 19 records of 'kimenarjo.nl', 0 errors, 0 warnings. Checked 23 zones, 7 had errors.

Other information

Usecase

Description

In my opinion the domain-id's should be treated as unique per backend. To clarify: domain-id '1' from gmysql != domain-id '1' from gpgsql != domain-id '1' from gmysql:server2 (https://doc.powerdns.com/authoritative/settings.html#launch)

The default schema's for MySQL, PostgreSQL and Oracle have an autoincrement field for domain-id, which starts at 1, so anyone using multiple SQL backends of those types might end up with this issue.

Habbie commented 4 years ago

8183 has some more observations on this.

In my opinion the domain-id's should be treated as unique per backend.

I always had in mind to replace domainIDs by domain names, but this is an interesting thought too!