Adding a DNS zone on a slave throws an error
When adding a new zone to a slave I always get two errors mailed.
WARNING - Reason for Bind restart failure: zone example.com/IN: has no NS records
zone example.com/IN: not loaded due to errors.
WARNING - Writing BIND domain file failed: /etc/bind/master/example.com zone example.com/IN: has no NS records zone example.com/IN: not loaded due to errors.
The reason seems to be that the first named-checkzone
is called just after the dns_soa record is replicated, but before any of the dns_rr records are replicated.
The easiest fix seems to be to just skip rendering and reloading bind if there are no records.
MR coming...