SaltDns. Propagation
(Salt v1.0.0)
What the public DNS says about a zone after its name servers moved: who the parent delegates it to, whether every delegated server answers, and whether they answer with the serial Salt's primary has.
This is the question an owner asks after changing the NS records at the registrar, and it cannot be answered from Salt's database. It reads:
- The parent's referral —
SaltDns.Resolver.delegation/1, the NS names the parent's own servers publish for the zone (a recursive resolver would ask the zone, which may not be served yet). - Which of those are Salt's — the configured nameservers
(
config :salt_dns, :nameservers, the names customers delegate to). A delegated name that is not one of them is another provider, and that is exactly the "the old provider still answers" case. - Each delegated server — every address of every delegated name is
asked for the zone's SOA, directly and without recursion, and the
serial is compared with the primary's (
SaltDns.Knot). An address this host cannot reach (no IPv6 route, for example) is:unchecked, never "no answer".
Nothing is changed and no key is needed. The resolver, the address lookup
and the SOA asker are injectable for tests through :resolver,
:addresses, :prober and :primary.
Summary
Functions
Checks zone as the public DNS sees it. Options: :resolver (default
SaltDns.Resolver), :nameservers (default the configured ones),
:addresses (a function from a name to its addresses), :prober (a
function (address, port, zone) -> {:ok, serial} | {:error, reason}),
:primary (a function from the zone name to the primary's serial, or a
number, or nil) and :port (default 53).
Types
@type server() :: %{ host: String.t(), address: String.t() | nil, serial: non_neg_integer() | nil, state: state(), detail: String.t() | nil }
@type state() ::
:current
| :behind
| :ahead
| :answered
| :no_answer
| :refused
| :servfail
| :unchecked
Functions
Checks zone as the public DNS sees it. Options: :resolver (default
SaltDns.Resolver), :nameservers (default the configured ones),
:addresses (a function from a name to its addresses), :prober (a
function (address, port, zone) -> {:ok, serial} | {:error, reason}),
:primary (a function from the zone name to the primary's serial, or a
number, or nil) and :port (default 53).