From c7c156e57bfed37fb6c4442ea22bd21bd272cfad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?m=C3=BCde?= Date: Wed, 8 Jul 2026 21:48:37 +0200 Subject: [PATCH] fix(hive-c0re): converge /run bind sources + limits drop-in before reconcile-start --- hive-c0re/src/job_queue/exec.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/hive-c0re/src/job_queue/exec.rs b/hive-c0re/src/job_queue/exec.rs index 93cb974f..9a229459 100644 --- a/hive-c0re/src/job_queue/exec.rs +++ b/hive-c0re/src/job_queue/exec.rs @@ -245,6 +245,19 @@ async fn run_reconcile( .transient .is_none() .then(|| coord.transient_guard(name, crate::coordinator::TransientKind::Starting)); + // Converge the ephemeral host-side state before the start: + // `/run/hyperhive/agents/` + `/run/hive-agent/` + // (both nspawn bind sources — tmpfs, empty after a host + // reboot; nspawn refuses to start with a missing source) + // and the resource-limits drop-in under + // `/run/systemd/system/`. Rebuild DAGs get this from their + // Prebuild/Swap nodes; the bare-Reconcile templates (boot + // reconcile, plain start/restart) otherwise start with + // nothing under /run and fail. + let agent_dir = coord.ensure_runtime(name)?; + let hive = coord.hive_env(); + let paths = Coordinator::agent_paths(name, agent_dir); + crate::lifecycle::write_dropins(name, &hive, &paths).await?; ctx.step("nixos-container start"); crate::lifecycle::start_with_fallback(name).await?; coord.kick_agent(name, "container started");