Include "SLAVE" type zones when querying catalog members#17049
Conversation
Pull Request Test Coverage Report for Build 23653434430Details
💛 - Coveralls |
zones of a "PRODUCER" catalog zone. Applies only to the SQL modules. Signed-off-by: ikoula <contrib@ikoula.com>
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
|
Addendum: forgot to add the -s to my commit. The last push should fix it. |
|
I'm afraid this does not sound right to me. With your change, secondary zones would be listed both as producer and consumer, and I doubt this is the right thing to do. |
|
The goal of this commit is to add the corresponding zone to the producer catalog if the catalog is set for a zone as a producer, even if the zone is of type “SLAVE.” Without this contribution, when PowerDNS acts as both a catalog producer and a secondary server, its secondary instances cannot receive zones that are defined as “SLAVE” on PowerDNS. According to RFC 9432, this behavior is problematic since catalogs are meant for zone propagation regardless of zone type on PowerDNS. For example, if you configure PowerDNS as the producer for “catalog.internal” and other DNS servers as consumers, and you also configure PowerDNS as a secondary server for “example.com” (from a Bind9 server, for instance) and add that zone to the “catalog.internal” catalog, the zone “example.com” will not be present in the catalog, so the secondary nodes will not be able to serve it. |
|
This is not how catalog zones was intended. Real solution is to use multiple catalogs, one for the primary zones on each primary server and chain/send those catalogs to the secondaries.
For the record, rfc9432 has no opinion on this. |
|
Thanks for your feedback, mind04. I do understand that a setup with multiple catalogs would be ideal in some specific cases. Unfortunately, this is not the case for every deployment. If you believe that PowerDNS should not publish a zone to a catalog (as a catalog producer) that is set as “SLAVE”, then why PowerDNS does allow other DNS servers to perform a zone transfer if the zone is set as “SLAVE”? RFC 9432 tells us that “Secondary name servers can then add, remove, or modify the zones they serve in accordance with the changes to the catalog zone.” , “[…] catalog zones only contain information for the management of a set of authoritative name servers.”, “Catalog zones simplify zone provisioning by orchestrating zones on secondary name servers from a single data source: the catalog” and “Member zone: A DNS zone whose configuration is published inside a catalog zone.” I believe that it does not exclude zones that are stored as “SLAVE” in the catalog producer DNS server. Besides, other DNS server implementations like Knot and Technitium allow us to add zones stored as secondary, on the catalog (as a catalog producer). |
This pull request aims to close issue #12135, which describes a similar problem.
When the PowerDNS authoritative server hosts a zone of type "SLAVE" and the "catalog" option is set, the "SLAVE" zone is not added to the corresponding catalog. This causes issues when PowerDNS is used as an intermediate server, for example, to provide secondary DNS services.
RFC 9432 (which defines catalog zones) states that catalog zones are used for management. This fix aims to allign PowerDNS with other DNS server implementations (Knot for example) to allow users to add "slave" (secondary) zones to catalogs.
Short description
Checklist
I have: