fix(orchestrator): reconcile recreates of bitcoin cascade-restart lnd

24fd97ed cascades on package.start/restart, but a reconcile pass that
recreates or starts a bitcoin backend (desired-state recovery, repair
recreate, boot InstallMissing) also moves the RPC address behind a
running lnd's back — §C 'restart lnd after ANY bitcoin recreate'.
After the pass, dependents from the shared address_caching_dependents
table (moved to app_ops as the single source of truth) that sat
untouched (NoOp) and aren't user-stopped are restarted under their op
lock; a dependent the pass itself (re)created already resolved the
fresh address and is left alone.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
archipelago
2026-07-10 10:27:36 -04:00
co-authored by Claude Fable 5
parent 854925c598
commit 755cd4f235
3 changed files with 127 additions and 10 deletions
@@ -1131,17 +1131,10 @@ fn orchestrator_stack_members(has_orchestrator: bool, package_id: &str) -> Optio
}
}
/// Dependents that resolve a backend's container address once at startup and
/// hold it: restarting the backend moves its IP and strands them until they
/// restart too. lnd dials the bitcoin RPC address it resolved at boot and
/// never re-resolves — after a bitcoin restart it spins on "dial tcp
/// <old-ip>:8332: no route to host" until lnd itself restarts (gate lnd
/// getinfo test, .228 2026-07-09; hardening plan §C cascade item).
/// See crate::app_ops::address_caching_dependents — shared with the
/// reconciler, which cascades after its own recreates.
fn address_caching_dependents(package_id: &str) -> &'static [&'static str] {
match package_id {
"bitcoin" | "bitcoin-core" | "bitcoin-knots" => &["lnd"],
_ => &[],
}
crate::app_ops::address_caching_dependents(package_id)
}
/// After a backend start/restart lands, bounce its address-caching dependents