-
Notifications
You must be signed in to change notification settings - Fork 492
Set name servers and NS records dynamically to handle multiple providers better #14
Description
Case 0: Don't talk to the Registrar
No NAMESERVER() or NAMESERVERS_FROM() directives exist in the zone.
NS() directives may be part of the zone and generate NS records, but these are not communicated to the Registrar.
Case 1: Set static name servers at the Registrar.
NAMESERVER() directives will generate NS records into the zone, and those named servers will be communicated to the Registrar to be the "registered name servers".
NS() directives may be part of the zone and generate NS records, but these are not communicated to the Registrar.
NOTE: Currently NAMESERVER() does not inject NS records into the zone. This is new functionality.
Case 2: Set dynamic name servers at the Registrar.
NAMESERVERS_FROM(DSP_foo) directives will query DSP_foo for the names of the name servers to be used for this zone. For each server, an NS record will be injected into the zone, and it will be be communicated to the Registrar as a "registered name servers".
NS() directives may be part of the zone and generate NS records, but these are not communicated to the Registrar.
NOTE: This requires a new pass done prior to the current processing: Loop through each domain looking for NAMESERVER_FROM() directives. For each, ask the DSP for a list of name servers to be used for this zone. For each server, an NS record will be injected into the zone, and it will be be communicated to the Registrar as a "registered name servers".
(In other words, a NAMESERVER_FROM() is equivalent to performing the query and generating a NAMESERVER() directive for each answer in the query.)
NOTE: The "BIND" DSP can not be queried via an API. Instead, the list of name servers should be taken from the meta data.
Case 3: Mixture of static and dynamic name servers are set at the Registrar.
NAMESERVER() and NAMESERVERS_FROM() directives are included. Each does its thing, adding to the name servers set at the Registrar. There should be no conflict.
NS() directives may be part of the zone and generate NS records, but these are not communicated to the Registrar.