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 <noreply@anthropic.com>
This commit is contained in:
archipelago 2026-07-01 09:12:13 -04:00
parent d0710e7491
commit 09d42cbbf7

View File

@ -1947,6 +1947,17 @@ pub(super) fn orchestrator_uninstall_app_ids(package_id: &str) -> Vec<String> {
"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:?}"
);
}
}
}