From 694e5b0a9d9fa720c119244268fe81d761258661 Mon Sep 17 00:00:00 2001 From: archipelago Date: Thu, 23 Apr 2026 10:06:55 -0400 Subject: [PATCH] fix(update): pass --create-missing when rollback recreates a destroyed container The update flow removes the old container before starting the new one. If the update fails after removal, the rollback path tries `podman start ` first, then falls back to reconcile. But reconcile without --create-missing treats the now-absent container as an optional one that the install flow will (re)create later, and skips it. Result: container stays destroyed until someone notices and runs reconcile manually. Add --create-missing to the rollback reconcile invocation so the fallback actually rebuilds the container from its canonical spec. Fixes the failure mode observed on .228 where a bitcoin-knots update left the node with no bitcoin-knots container at all. --- core/archipelago/src/api/rpc/package/update.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/archipelago/src/api/rpc/package/update.rs b/core/archipelago/src/api/rpc/package/update.rs index 72b0c391..03633c1e 100644 --- a/core/archipelago/src/api/rpc/package/update.rs +++ b/core/archipelago/src/api/rpc/package/update.rs @@ -306,11 +306,14 @@ impl RpcHandler { Ok(o) => { let stderr = String::from_utf8_lossy(&o.stderr); warn!("Rollback: could not restart {}: {}", name, stderr.trim()); - // Container was already removed — try reconcile to recreate with old image + // Container was already removed (forward path ran `podman rm`). + // Use --create-missing so reconcile rebuilds it from its + // canonical spec instead of skipping it as optional. let _ = tokio::process::Command::new("bash") .args([ "/opt/archipelago/scripts/reconcile-containers.sh", &format!("--container={}", name), + "--create-missing", "--force", ]) .output()