Files
urutau/deploy/host/urutau-containers-watch
T
Lucas RayanandClaude Opus 5.5 65015158dc
CI / Format and vet (pull_request) Successful in 1m43s
CI / Dependency audit (pull_request) Successful in 39s
CI / Tests (Linux, race detector) (pull_request) Successful in 2m37s
fix(egress): container map refreshed on start; no new_geo for anycast CDNs (2.2.2)
A LambdaMail redeploy swapped rspamd and clamav addresses and the hub judged
the next minute with the stale containers.map, filing SURBL/DNS traffic under
clamav and freshclam under dns. The host kit now runs urutau-containers-watch
(docker events -> map rewrite) and the probe polls the file every 2 s.

new_geo is skipped for large CDNs/clouds: anycast addresses carry a
meaningless database country (1.1.1.1 in AU, Cloudflare edges in CA).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 15:25:23 -03:00

14 lines
636 B
Bash
Executable File

#!/bin/bash
# Urutau: rewrites containers.map as soon as Docker attaches a container to a
# network, so a redeploy that swaps addresses between containers is not judged
# with the old names until the next minute of the timer.
set -u
docker events --filter type=network --filter event=connect --filter type=container --filter event=start --format '{{.Type}}' |
while read -r _; do
/usr/local/sbin/urutau-containers-map || true
# a stack redeploy fires dozens of events: drain the burst, then refresh once more
n=0
while read -r -t 1 _; do n=$((n + 1)); done
[ "$n" -gt 0 ] && { /usr/local/sbin/urutau-containers-map || true; }
done