SaltDns.Knot.Frozen (Salt v1.0.0)

Signed zones that are frozen because their DNSSEC keys could not be imported when this cluster's leader changed (SaltDns.Knot.Failover).

A frozen zone keeps the signed copy Knot has and takes no change: Knot is not written to (SaltDns.Knot.Reconcile), and so that nobody is told "saved" for a change that would never reach DNS, SaltDns.Zones refuses record changes to it ({:error, :zone_frozen}; the REST and PowerDNS APIs answer 503, the RFC 2136 listener SERVFAIL, the console disables editing). The rows live in Postgres, not in the leader's memory, because the API of every node must know.

A zone is thawed when its keys import (see SaltDns.Knot.Reconcile).

Summary

Functions

How many zones are frozen (0 when there is no database).

What the console banner and the REST error add: how long the frozen copy lasts.

Freezes the zone (idempotent).

True when the zone (by id) is frozen.

True when the active zone of that name is frozen.

Ids of the frozen zones.

The text clients are given.

Seconds since the oldest freeze, or 0. A frozen zone is a secondary of a peer that no longer leads, so Knot stops answering for it when its SOA expire time passes (organisations may set it as low as one day): this is the number to watch (SaltDnsFrozenLong).

Makes exactly these zones the frozen ones.

Thaws the zone.

Functions

count()

@spec count() :: non_neg_integer()

How many zones are frozen (0 when there is no database).

expiry_note()

@spec expiry_note() :: String.t()

What the console banner and the REST error add: how long the frozen copy lasts.

freeze(zone_id)

@spec freeze(integer()) :: :ok

Freezes the zone (idempotent).

frozen?(zone_id)

@spec frozen?(integer()) :: boolean()

True when the zone (by id) is frozen.

frozen_name?(name)

@spec frozen_name?(String.t()) :: boolean()

True when the active zone of that name is frozen.

ids()

@spec ids() :: [integer()]

Ids of the frozen zones.

message()

@spec message() :: String.t()

The text clients are given.

oldest_age_seconds()

@spec oldest_age_seconds() :: non_neg_integer()

Seconds since the oldest freeze, or 0. A frozen zone is a secondary of a peer that no longer leads, so Knot stops answering for it when its SOA expire time passes (organisations may set it as low as one day): this is the number to watch (SaltDnsFrozenLong).

replace(zone_ids)

@spec replace([integer()]) :: :ok

Makes exactly these zones the frozen ones.

thaw(zone_id)

@spec thaw(integer()) :: :ok

Thaws the zone.