SaltDns.Registrar.Preflight (Salt v1.0.0)

The checks the console runs before it changes the name servers of a domain at the registrar.

Changing the delegation is the one registrar action that can take a whole name off the air: the registry starts pointing resolvers at whatever the new servers answer, and anything those servers do not have stops existing. The check gathers, for the domain and the name servers about to be set:

  • :zone - Salt holds an active zone for the name;
  • :serving - every name server about to be set answers the zone's SOA;
  • :records - the record sets Salt holds match the servers that answer today (a zone transfer when the current servers allow one, otherwise a question per record Salt holds);
  • :dnssec - the DS state at the parent agrees with whether Salt's zone is signed (a DS over an unsigned zone makes validating resolvers SERVFAIL after the move);
  • :glue - every name server under the domain carries an address, and that address is what the zone serves for it.

The result is

%{ok: boolean(), checks: [%{key:, title:, status:, detail:, facts:}]}

where status is :pass, :warn or :fail. ok is false when any check is :fail; a :warn is something the operator should read but that does not by itself make the move wrong (a refused transfer that was replaced by the per-record questions; a name Salt adds; a DS lookup that did not answer).

Everything that reaches the network can be replaced for tests with an option: :zones, :rrsets, :resolve, :soa, :axfr, :direct, :delegation, :ds.

Summary

Functions

Runs every check for domain (%{fqdn: ...}) with the name server entries about to be set (%{name:, ipv4:, ipv6:}). See the module documentation.

Salt's own name server names, as the preset uses them.

Types

check()

@type check() :: %{
  key: atom(),
  title: String.t(),
  status: status(),
  detail: String.t(),
  facts: [String.t()]
}

result()

@type result() :: %{ok: boolean(), checks: [check()]}

status()

@type status() :: :pass | :warn | :fail

Functions

check(organisation, map, entries, opts \\ [])

@spec check(map(), map(), [map()], keyword()) :: result()

Runs every check for domain (%{fqdn: ...}) with the name server entries about to be set (%{name:, ipv4:, ipv6:}). See the module documentation.

salt_nameservers()

@spec salt_nameservers() :: [String.t()]

Salt's own name server names, as the preset uses them.