From 22522b386a4e8a64a3bf3ffa23610c13afb9063b Mon Sep 17 00:00:00 2001 From: atlas Date: Wed, 28 Oct 2026 18:29:53 +0100 Subject: [PATCH] log the proxy-credential, cache-miss and users-file passes at info, with counts in the message --- hive-c0re/src/workers/squid_users.rs | 10 +++++----- swarm-controller/src/cache_miss.rs | 6 +++++- swarm-controller/src/proxy_credential.rs | 5 +++++ 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/hive-c0re/src/workers/squid_users.rs b/hive-c0re/src/workers/squid_users.rs index c2fb0269..8023a3a0 100644 --- a/hive-c0re/src/workers/squid_users.rs +++ b/hive-c0re/src/workers/squid_users.rs @@ -214,19 +214,19 @@ where let list = render_unrestricted(&users); if write_if_changed(files.unrestricted, &list)? { tracing::info!( - unrestricted = list.lines().count(), file = %files.unrestricted.display(), - "squid users: wrote the unrestricted list" + "squid users: wrote the unrestricted list, {} unrestricted", + list.lines().count() ); } let current = read_or_empty(files.users)?; let rendered = render(¤t, &users)?; if write_if_changed(files.users, &rendered)? { tracing::info!( - users = users.len(), - agents = users.iter().filter(|u| !is_selfcheck(&u.name)).count(), file = %files.users.display(), - "squid users: wrote the users file" + "squid users: wrote the users file, {} users for {} agents", + users.len(), + users.iter().filter(|u| !is_selfcheck(&u.name)).count() ); } Ok(()) diff --git a/swarm-controller/src/cache_miss.rs b/swarm-controller/src/cache_miss.rs index d313dd63..0de080ea 100644 --- a/swarm-controller/src/cache_miss.rs +++ b/swarm-controller/src/cache_miss.rs @@ -477,6 +477,7 @@ pub fn spawn( ) { tokio::spawn(async move { let metrics = Metrics::global(); + tracing::info!("cache miss: pass every {}m", PASS_INTERVAL.as_secs() / 60); let mut backoff = Backoff::default(); let mut ticker = tokio::time::interval_at(tokio::time::Instant::now() + PASS_INTERVAL, PASS_INTERVAL); @@ -495,7 +496,10 @@ pub fn spawn( } }; match pass(&world, &mut backoff, &metrics, Instant::now()).await { - Ok(sent) => tracing::debug!(rebuilds = sent.len(), "cache miss: pass done"), + Ok(sent) if !sent.is_empty() => { + tracing::info!("cache miss: pass sent {} rebuilds", sent.len()); + } + Ok(_) => tracing::debug!("cache miss: pass done, no misses"), Err(e) => tracing::warn!(error = %format!("{e:#}"), "cache miss: pass failed"), } } diff --git a/swarm-controller/src/proxy_credential.rs b/swarm-controller/src/proxy_credential.rs index 3b242ef1..97130651 100644 --- a/swarm-controller/src/proxy_credential.rs +++ b/swarm-controller/src/proxy_credential.rs @@ -158,6 +158,11 @@ pub fn spawn(hives: Vec) { anyhow::Ok((agents.len(), mint_missing(&store, &agents, &hives).await)) }; match pass.await { + Ok((agents, minted)) if minted > 0 => { + tracing::info!( + "proxy credentials: minted {minted} (agents and hive self-checks); {agents} agents hold a store identity" + ); + } Ok((agents, minted)) => { tracing::debug!(agents, minted, "proxy credentials: pass done"); }