Proxy follow-ups: unreachable address family, real client address, exchange test in CI #71

Merged
calvin merged 5 commits from proxy-followups into master 2026-11-13 08:04:14 +00:00
Owner

Three follow-ups found on the live system.

  1. Health probe and an address family the prober cannot reach. A probe has three outcomes per address: ok, failed, not checkable from here. The rule is in SaltDns.Proxy.Families and docs/shaker.md: eafnosupport and eaddrnotavail are always local; a quick enetunreach is local; a quick ehostunreach counts only when two or more addresses of the family all give it; everything else is a failure. A node is probe-healthy when every checkable address is ok and at least one could be checked; the addresses of an unchecked family follow the node's state. Per group: unchecked_families (column, default empty), console line "IPv6 is not checked: Salt's own host has no IPv6 route", API field, gauge salt_dns_proxy_family_unchecked{organisation,group,family}, info alert SaltDnsProxyFamilyUnchecked with a promtool test. Nothing checkable for a group is the existing prober-cannot-judge case, for that group.
  2. The suggested address was the proxy's. The listener reports the proxy as ::ffff:10.0.27.4; the trusted range 10.0.0.0/16 never matched it (IPv6 tuple against IPv4 range), so the forwarded header was ignored. ProxyIP normalises IPv4-mapped addresses; enrolment and the WebSocket upgrade use RemoteIp.client_ip/1; record_connection refuses private/loopback addresses and clears such a stored suggestion.
  3. CI runs the exchange test. ci/fetch-shaker.sh (secret shaker_package_token) downloads the binary and checksums, verifies, and the test container mounts it at /shaker. No token: one line, test skipped. Download failure does not fail a pull request; checksum mismatch fails. The skip message says how to get the binary.

Migration: one column with an empty-array default; existing rows stay valid.

Deploy effects: see the report in the session; the live group keeps both nodes in, IPv4 only, and nothing is published differently until IPv6 addresses are added.

Checks: format, compile --warnings-as-errors, credo --strict clean; coveralls 91.7%; database tests on a private stack (torn down).

Three follow-ups found on the live system. 1. Health probe and an address family the prober cannot reach. A probe has three outcomes per address: ok, failed, not checkable from here. The rule is in `SaltDns.Proxy.Families` and `docs/shaker.md`: eafnosupport and eaddrnotavail are always local; a quick enetunreach is local; a quick ehostunreach counts only when two or more addresses of the family all give it; everything else is a failure. A node is probe-healthy when every checkable address is ok and at least one could be checked; the addresses of an unchecked family follow the node's state. Per group: `unchecked_families` (column, default empty), console line "IPv6 is not checked: Salt's own host has no IPv6 route", API field, gauge `salt_dns_proxy_family_unchecked{organisation,group,family}`, info alert `SaltDnsProxyFamilyUnchecked` with a promtool test. Nothing checkable for a group is the existing prober-cannot-judge case, for that group. 2. The suggested address was the proxy's. The listener reports the proxy as `::ffff:10.0.27.4`; the trusted range `10.0.0.0/16` never matched it (IPv6 tuple against IPv4 range), so the forwarded header was ignored. `ProxyIP` normalises IPv4-mapped addresses; enrolment and the WebSocket upgrade use `RemoteIp.client_ip/1`; `record_connection` refuses private/loopback addresses and clears such a stored suggestion. 3. CI runs the exchange test. `ci/fetch-shaker.sh` (secret `shaker_package_token`) downloads the binary and checksums, verifies, and the test container mounts it at `/shaker`. No token: one line, test skipped. Download failure does not fail a pull request; checksum mismatch fails. The skip message says how to get the binary. Migration: one column with an empty-array default; existing rows stay valid. Deploy effects: see the report in the session; the live group keeps both nodes in, IPv4 only, and nothing is published differently until IPv6 addresses are added. Checks: format, compile --warnings-as-errors, credo --strict clean; coveralls 91.7%; database tests on a private stack (torn down).
A probe now has three outcomes per address: ok, failed, and not checkable
from here (no route or no address of that family on Salt's own host). A node
is probe-healthy when every checkable address is ok and at least one could be
checked; the addresses of an unchecked family follow the node's state. The
group keeps unchecked_families (console line, API field, gauge
salt_dns_proxy_family_unchecked, info alert). When nothing is checkable for a
group, the round changes nothing for it, like the existing blind case.
A dual-stack listener reports the proxy as ::ffff:10.0.27.4, which a
10.0.0.0/16 trusted range never matched (the families differ), so the header
was ignored and the proxy's address became the node's suggestion. ProxyIP now
normalises IPv4-mapped addresses; the enrolment endpoint and the WebSocket
upgrade resolve the client with RemoteIp.client_ip/1, and record_connection
refuses private and loopback addresses and clears such a stored suggestion.
ci/fetch-shaker.sh downloads the binary and sha256sums.txt when
SHAKER_PACKAGE_TOKEN (Woodpecker secret shaker_package_token) is set, verifies
the checksum, and the test container mounts it at /shaker. Without the token
one line says the exchange test is skipped. The test's skip message now says
how to get the binary. Docs and changelog updated for all three items.
Credo fixes and a console test for the unchecked-family line
Some checks failed
ci/woodpecker/pr/image Pipeline was successful
ci/woodpecker/pr/quality Pipeline was successful
ci/woodpecker/pr/integration Pipeline failed
d481bd3034
Let the exchange test start Shaker when the tests run as root
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
a5eaf88680
calvin merged commit 8b2ed5458b into master 2026-11-13 08:04:14 +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!71
No description provided.