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>
14 lines
636 B
Bash
Executable File
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
|