Commit graph

4 commits

Author SHA1 Message Date
acamilo
f21bd45077 fly-feed: silence the failed write itself; the test reproduces pct exec (SIGPIPE ignored, a reader that leaves)
The previous test sent stdout to /dev/null before the pipe, so head never
closed it, and printf still printed its write error. With SIGPIPE ignored
and a slow systemctl stub the old fly-feed prints the live error
('echo: write error: Broken pipe'); the fix prints nothing.
2026-10-02 13:16:49 +00:00
acamilo
75e231c707 fly-feed: status exits quietly on a closed stdout (no broken-pipe error on stderr)
When stdout is closed early (e.g. `fly-feed status | head -1`), the second and later
status_report writes fail with EPIPE; bash's builtins report "write error: Broken pipe"
to stderr even with `trap '' PIPE`, because the failed write is reported by the
runtime, not the signal handler. Route every status_report write through a `say`
helper that checks printf's exit status and exits 0 on the first EPIPE: the reader
is gone, nothing useful is left to do, and `set -e` must not trip on the failing
write.

The change is scoped to status_report: bus/direct's stderr log/record writes are
unaffected, the output text is unchanged, and the switching behaviour and exit
codes are untouched. A test in infra/tests/lint.sh runs `fly-feed status` with
the existing stubbed state into `| head -1` and asserts nothing is written to
stderr.
2026-10-02 13:04:20 +00:00
acamilo
eaae6fd82a EDGE-02 notes: bus threads on an aux cpu (FLY_SESSION_AUX_CPUS, SESSION_AUX_CPUS in the deploy), fly-feed direct never rolled back, watchdog falls back to direct at the 4th failure and never reboots for the edge; runbook cost corrected 2026-10-02 04:22:39 +00:00
acamilo
6612f9ae9c feed bus in production: fly-feed switch, flysim wants the edge, watchdog checks the edge and falls back, deploy refuses a release without fly-edge 2026-10-01 22:10:44 +00:00