Proxy groups: address records and health checks (off until switched on) #69

Merged
calvin merged 11 commits from proxy-health into master 2026-11-13 06:52:54 +00:00
Owner

Address records and health checks for proxy groups (design: section 4.5 of the certificates and discovery study). Off for every group until manage_addresses is switched on; existing rows stay valid.

What it does

  • Each node has public addresses entered by the operator (console, API; checked with SaltDns.AddressFilter, as for secondaries). The address a node enrolled or connected from is stored as a suggestion only, using the existing trusted-proxy handling.
  • With manage_addresses on, Salt keeps A and AAAA record sets for the group's address names (route hosts inside the organisation's active zones, unless the route says not to, plus extra names added by hand). TTL is a group setting (default 60, minimum 30).
  • Health: connected now, last signed status ok and running and younger than 20 minutes, and a TCP+TLS probe of port 443 on each published address (5 s timeout, any certificate, no chain validation), every 20 s per node from the replica holding the leader lease. in -> out after 3 failed checks, out -> in after 6 good ones; an operator can drain a node and return it to automatic.
  • Never an empty answer: if a family would be empty, the addresses of all non-drained nodes are kept; if every node is drained, the last published set stays with a loud warning; if every probe fails for every node the prober changes nothing and raises an event.
  • Safety: a name with an A, AAAA or CNAME that the feature did not write is a conflict (shown with what is there, never overwritten or merged); ownership is the table proxy_published_records; a set edited afterwards is no longer ours; removals touch only the feature's own sets; a name under a delegation is refused; the apex is allowed. Writes use the zone mutation path with the new audit source proxy.
  • Console section and settings, /api/v1/proxy endpoints (node addresses, drain, automatic, extra names, address names with state, PATCH of the address settings), OpenAPI, metrics, four alerts with promtool tests, docs, changelog.

Schema: columns with defaults on proxy_groups, proxy_routes and shaker_nodes; new tables proxy_extra_names and proxy_published_records; the changes.source check admits proxy; rrsets.ttl lower bound moves from 60 to 30 (only the proxy actor may write below 60).

Tests: state machine and name planning (pure, with properties), database tests for the whole loop with a fake prober and presence, prober tests against local listeners, API and console tests, metrics, and an integration test that shows the Knot primary serving the changed record set. Also fixes the rule count in alert_rules_test.exs (it said 32, master already had 36).

Address records and health checks for proxy groups (design: section 4.5 of the certificates and discovery study). Off for every group until `manage_addresses` is switched on; existing rows stay valid. What it does - Each node has public addresses entered by the operator (console, API; checked with `SaltDns.AddressFilter`, as for secondaries). The address a node enrolled or connected from is stored as a suggestion only, using the existing trusted-proxy handling. - With `manage_addresses` on, Salt keeps A and AAAA record sets for the group's address names (route hosts inside the organisation's active zones, unless the route says not to, plus extra names added by hand). TTL is a group setting (default 60, minimum 30). - Health: connected now, last signed status ok and running and younger than 20 minutes, and a TCP+TLS probe of port 443 on each published address (5 s timeout, any certificate, no chain validation), every 20 s per node from the replica holding the leader lease. `in` -> `out` after 3 failed checks, `out` -> `in` after 6 good ones; an operator can drain a node and return it to automatic. - Never an empty answer: if a family would be empty, the addresses of all non-drained nodes are kept; if every node is drained, the last published set stays with a loud warning; if every probe fails for every node the prober changes nothing and raises an event. - Safety: a name with an A, AAAA or CNAME that the feature did not write is a conflict (shown with what is there, never overwritten or merged); ownership is the table `proxy_published_records`; a set edited afterwards is no longer ours; removals touch only the feature's own sets; a name under a delegation is refused; the apex is allowed. Writes use the zone mutation path with the new audit source `proxy`. - Console section and settings, `/api/v1/proxy` endpoints (node addresses, drain, automatic, extra names, address names with state, PATCH of the address settings), OpenAPI, metrics, four alerts with promtool tests, docs, changelog. Schema: columns with defaults on `proxy_groups`, `proxy_routes` and `shaker_nodes`; new tables `proxy_extra_names` and `proxy_published_records`; the `changes.source` check admits `proxy`; `rrsets.ttl` lower bound moves from 60 to 30 (only the `proxy` actor may write below 60). Tests: state machine and name planning (pure, with properties), database tests for the whole loop with a fake prober and presence, prober tests against local listeners, API and console tests, metrics, and an integration test that shows the Knot primary serving the changed record set. Also fixes the rule count in `alert_rules_test.exs` (it said 32, master already had 36).
Use the certificate's own host as the common name of the signing request
All checks were successful
ci/woodpecker/pr/image Pipeline was successful
ci/woodpecker/pr/quality Pipeline was successful
ci/woodpecker/pr/integration Pipeline was successful
b62931cc24
Merge remote-tracking branch 'origin/master' into csr-subject
All checks were successful
ci/woodpecker/pr/image Pipeline was successful
ci/woodpecker/pr/quality Pipeline was successful
ci/woodpecker/pr/integration Pipeline was successful
7201ca5bac
# Conflicts:
#	CHANGELOG.md
# Conflicts:
#	CHANGELOG.md
Merge remote-tracking branch 'origin/csr-subject' into proxy-health
All checks were successful
ci/woodpecker/pr/image Pipeline was successful
ci/woodpecker/pr/quality Pipeline was successful
ci/woodpecker/pr/integration Pipeline was successful
03e63867f9
# Conflicts:
#	CHANGELOG.md
calvin merged commit b94cdbffca into master 2026-11-13 06:52:54 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
external/salt-dns!69
No description provided.