SaltDns.Knot.Knotc (Salt v1.0.0)

SaltDns.Knot implemented with knotc subprocesses (see SaltDns.Knot.Probe: argument lists, never a shell, timeouts, tagged errors).

Configuration transactions (conf-begin ... conf-commit) run inside SaltDns.Knot.ConfigServer; zone transactions (zone-begin ... zone-commit) are per zone and must be serialised per zone by the caller (the per-zone writer). Knot rejects an overlapping zone transaction with "too many transactions", returned as {:error, :transaction_in_progress} without touching the other transaction.

Settings, from config :salt_dns, SaltDns.Knot.Knotc:

  • :socket - control socket (default "/run/knot/knot.sock", or the KNOT_SOCKET environment variable at runtime when unset)
  • :binary, :timeout, :runner - as for SaltDns.Knot.Probe
  • :keymgr_binary / :keymgr_args - the keymgr executable (or a wrapper, as dev/keymgr runs it inside the Knot container; default the KEYMGR_BINARY environment variable, then "keymgr") and arguments to put before the command, e.g. ["-C", "/storage/confdb"]. Only dnssec_status/1 needs it; keymgr reads the key store directly.
  • :policies - Knot policy ids for :nsec and :nsec3 (default %{nsec: "salt-nsec", nsec3: "salt-nsec3"})
  • :config_server - registered name of the ConfigServer
  • :load_retries / :load_retry_ms - how long to wait for a freshly configured zone to finish loading (default 50 x 100 ms)

Summary

Functions

Runs fun with Knot writes allowed although this node is not the leader: for the steps that make this node's own Knot a secondary or a primary (SaltDns.Knot.Failover), which have their own safeguards. Only affects the calling process, so call it inside the function given to SaltDns.Knot.ConfigServer.

Functions

as_local(fun)

@spec as_local((-> result)) :: result when result: term()

Runs fun with Knot writes allowed although this node is not the leader: for the steps that make this node's own Knot a secondary or a primary (SaltDns.Knot.Failover), which have their own safeguards. Only affects the calling process, so call it inside the function given to SaltDns.Knot.ConfigServer.