HA

POST /internal/ha/events/ingest

Ingest an HA event (write to DB + broadcast SSE in one shot)

Called by keepalived notify scripts (via karios_ha_event.sh) to record an HA state change. The event is written to app_events (resource_type=’HA’) and simultaneously broadcast to all connected SSE clients on the “ha” channel. This eliminates the 5-second polling delay of the old event_tail approach.

Request JSON Object:
  • action (string) – e.g. “PG_PROMOTED”, “VIP_ACQUIRED” (required)

  • level (string) – INFO | WARN | ERROR

  • message (string) – human-readable description

  • resource_uuid (string) – node IP that fired the event (required)

  • status (string) – COMPLETED | FAILED | IN_PROGRESS

Status Codes:
POST /internal/haconfig/update

Sync lsyncd SSH keys across the management cluster

Called by other management nodes when cluster state changes. Synchronises lsyncd SSH keys with all peers so DHCP-scope rsync works after any topology change. (Former HAProxy config reload retired — Envoy is the sole edge gateway.)

Status Codes:
POST /internal/scripts/reconcile

Reconcile all managed scripts to their embedded state

Forces a full SHA-256 reconciliation of all keepalived health-check and notify scripts against the versions embedded in this binary. Missing or tampered files are atomically restored. Safe to call at any time — idempotent.

Status Codes:
GET /internal/scripts/{name}

Return embedded script content by name

Returns the embedded (authoritative) content of a managed script by its on-disk basename (e.g. “check_dhcp.sh”). Useful for auditing whether the on-disk version matches what the binary expects.

Parameters:
  • name (string) – Script basename (e.g. check_dhcp.sh)

Status Codes:
GET /internal/ssh/lsyncd-pubkey

Return this node’s lsyncd SSH public key

Returns the lsyncd-dedicated SSH public key for this management node. Called by peer nodes during SSH key exchange so that each peer can authorise this node to rsync DHCP scopes to it. No authentication required — internal cluster endpoint only.

Status Codes: