From 09d42cbbf7711bd95e4016990133f42ca5567d16 Mon Sep 17 00:00:00 2001 From: archipelago Date: Wed, 1 Jul 2026 09:12:13 -0400 Subject: [PATCH] fix(orchestrator): immich uninstall must disable its sibling app_ids too orchestrator_uninstall_app_ids("immich") only disabled the "immich" app_id itself; "immich-postgres" and "immich-redis" (separate orchestrator-tracked manifests, same pattern as mempool-api/archy-mempool-db) stayed enabled, so the boot reconciler kept restarting their leftover stopped containers forever after the generic uninstall path stopped them (.198, 2026-07-01 -- found while uninstalling immich to relieve disk I/O pressure competing with a slow Bitcoin IBD). Co-Authored-By: Claude Sonnet 5 --- .../src/api/rpc/package/runtime.rs | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/core/archipelago/src/api/rpc/package/runtime.rs b/core/archipelago/src/api/rpc/package/runtime.rs index 2e2170cb..e28d8382 100644 --- a/core/archipelago/src/api/rpc/package/runtime.rs +++ b/core/archipelago/src/api/rpc/package/runtime.rs @@ -1947,6 +1947,17 @@ pub(super) fn orchestrator_uninstall_app_ids(package_id: &str) -> Vec { "archy-btcpay-db".into(), ], "fedimint" => vec!["fedimint".into(), "fedimint-gateway".into()], + // Immich: multi-container stack, mirrors `immich_stack_app_ids` in + // stacks.rs. Without this, uninstalling "immich" only disabled the + // orchestrator-tracked "immich" app_id — "immich-postgres" and + // "immich-redis" stayed enabled, so the boot reconciler kept + // restarting their leftover stopped containers forever after the + // generic uninstall path stopped them (`.198`, 2026-07-01). + "immich" => vec![ + "immich-postgres".into(), + "immich-redis".into(), + "immich".into(), + ], _ => vec![package_id.to_string()], } } @@ -1966,4 +1977,19 @@ mod tests { fn runtime_host_ports_preserve_legacy_extra_ports() { assert_eq!(runtime_host_ports("gitea"), vec![3001, 2222, 3000]); } + + #[test] + fn immich_uninstall_covers_every_sibling_orchestrator_app_id() { + // Regression: uninstalling "immich" used to only disable the + // "immich" app_id itself, leaving immich-postgres/immich-redis + // enabled — the boot reconciler kept restarting their leftover + // stopped containers forever (.198, 2026-07-01). + let ids = orchestrator_uninstall_app_ids("immich"); + for expected in ["immich-postgres", "immich-redis", "immich"] { + assert!( + ids.iter().any(|id| id == expected), + "missing {expected} in {ids:?}" + ); + } + } }