A listener that couldn't bind used to be logged once and forgotten: the
node looked alive to anything checking the process, and a port the old
process still held for a moment after a restart was never tried again.
- Each listener now opens in its own task. A port in use is retried
with backoff (0.5 s doubling to 5 s) for 30 s; any other bind error
fails at once.
- A listener that isn't open is kept in ListenerControl's failures,
"id address: reason" (also while it's being retried). /healthz/ready
answers 503 with {"unboundListeners": [...]} while any is listed;
liveness is unchanged. Stopping a listener on purpose (the
legacy-protocols switch) clears it.
- Each node writes its list to the store (`_` key "Ol" + node id, owner
'O' "listener status" in fork_subspaces), and x:ClusterNode gets a
read-only unboundListeners (property 947) read from there, so the
console can show it whichever node it talks to. A node clears its
record at startup.
- INBUXA_LISTENER_FAILURE=exit ends the process with exit code 1 when a
listener configured at startup can't open, after the retry window.
"report" is the default. Listeners put back later (LP-5) only report.
Test: bind_health (failure list, backoff, which errors retry, the
setting) and listen.rs (a port in use is waited for; one held too long
fails after the window; other bind errors aren't retried).
153 KiB
153 KiB