From 9f82dc4e7d1e8f09b1862d58025e2ab52970902d Mon Sep 17 00:00:00 2001 From: atlas Date: Fri, 24 Jul 2026 13:50:50 +0200 Subject: [PATCH] fix(#2676): stop hive-priv flooding the journal with `list` output MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `container_run` logs every stdout line at INFO (target `nixos-container`) as operation progress. For the read-only `list` op — called on the hot path (dashboard rescan, forge + boot sweeps) — that stdout is the return value, not progress, so every call logs the full ~28-line container roster at INFO. hive-c0re calls it several times a second, flooding the host journal. Gate the stdout per-line INFO logging on the op not being `list`. Mutating ops still log their progress; stderr is still logged for every op (errors matter regardless). No behaviour change beyond log volume. --- hive-priv/src/main.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/hive-priv/src/main.rs b/hive-priv/src/main.rs index 8728c93d..9610d605 100644 --- a/hive-priv/src/main.rs +++ b/hive-priv/src/main.rs @@ -1419,8 +1419,15 @@ async fn container_run(args: &[&str]) -> Result<(String, String)> { .context("invoke nixos-container")?; let stdout = String::from_utf8_lossy(&out.stdout).into_owned(); let stderr = String::from_utf8_lossy(&out.stderr).into_owned(); - for line in stdout.lines() { - tracing::info!(target: "nixos-container", "{line}"); + // `list` is a read-only enumeration called on the hot path (dashboard + // rescan, forge + boot sweeps) — its stdout is the return value, not + // progress, so logging every container name on every call floods the + // journal. Log stdout only for the mutating ops, where each line is + // genuine progress. stderr is always logged (errors matter regardless). + if args.first() != Some(&"list") { + for line in stdout.lines() { + tracing::info!(target: "nixos-container", "{line}"); + } } for line in stderr.lines() { tracing::warn!(target: "nixos-container", "{line}");