SaltDns.Shaker.Node (Salt v1.0.0)

A load-balancer host enrolled with Shaker (contract 3.2).

recipient is the node's age X25519 public key (age1...) and signing_key its Ed25519 public key, both base64url as the wire sends them. Neither is a secret, so neither is encrypted; the private halves never leave the host.

status is:

  • :pending — registered from an offline enrolment request (bootstrap); the node has not connected yet. A node may connect from this state and becomes :active on a successful authentication.
  • :active — enrolled online, or the pending node has authenticated at least once.
  • :retired — removed by an operator; the socket refuses it.

Whether a node is connected right now is not a column: it is live state, answered cluster-wide by SaltDns.Shaker.Presence.

proxy_group_id is the real group (SaltDns.Proxy.Group) the node belongs to; group_name is its name at enrolment. A node without a group id (enrolled before groups existed, or with a plain group name) receives an empty state. socket_group and in_container are what the node reported about its HAProxy; the generated configuration depends on them.

addresses are the public addresses the operator entered for this node (published for the group's names when the group manages addresses); suggested_address is only where the node last connected from, never published. health_state (in or out), the two counters and health_override (drained, or nil for automatic) are the state of SaltDns.Proxy.Health; recent_checks keeps the last results as evidence.

applied_generation is the last generation the node reported applying and last_status its last verified status report (without the signature). seq_state and seq_certificate are the last envelope sequence numbers issued per kind; see SaltDns.Shaker.Envelope.

Summary

Functions

Changeset for a newly enrolled node; the caller sets enrolled_at.

The statuses a node may have.

Types

t()

@type t() :: %SaltDns.Shaker.Node{
  __meta__: term(),
  address_claims: term(),
  addresses: term(),
  applied_generation: term(),
  enrolled_at: term(),
  fail_count: term(),
  group_name: term(),
  health_changed_at: term(),
  health_override: term(),
  health_reason: term(),
  health_state: term(),
  hostname: term(),
  id: term(),
  in_container: term(),
  inserted_at: term(),
  last_check_at: term(),
  last_error: term(),
  last_ok_status_at: term(),
  last_seen_at: term(),
  last_status: term(),
  last_status_at: term(),
  ok_count: term(),
  proxy_group: term(),
  proxy_group_id: term(),
  recent_checks: term(),
  recipient: term(),
  seq_certificate: term(),
  seq_state: term(),
  shaker_version: term(),
  signing_key: term(),
  socket_group: term(),
  software_version: term(),
  status: term(),
  strategy: term(),
  suggested_address: term(),
  suggested_address_at: term(),
  updated_at: term()
}

Functions

changeset(node, attrs)

@spec changeset(t(), map()) :: Ecto.Changeset.t()

Changeset for a newly enrolled node; the caller sets enrolled_at.

statuses()

@spec statuses() :: [atom()]

The statuses a node may have.