feat(#2349): fan reconcile's start/stop out as first-class dag nodes
This commit is contained in:
parent
7b1b1d9db8
commit
79d4c345bb
4 changed files with 156 additions and 63 deletions
|
|
@ -90,10 +90,21 @@ pub enum NodeKind {
|
|||
sweep: bool,
|
||||
fanout: Option<Vec<String>>,
|
||||
},
|
||||
/// Idempotent power converge: read `wanted` + observed state;
|
||||
/// start if `Up` & down (with cold-start fallback), stop if
|
||||
/// `Offline` & up, else noop.
|
||||
/// Idempotent power converge *planner*: read `wanted` + observed
|
||||
/// state and decide the action (start if `Up` & down, stop if
|
||||
/// `Offline` & up, else noop). The mechanical work is not done in
|
||||
/// this node — it fans a child [`NodeKind::Start`] / [`NodeKind::Stop`]
|
||||
/// DAG out at runtime so the sub-step is a first-class DAG node.
|
||||
Reconcile,
|
||||
/// Mechanical container start: the start preamble (runtime dir +
|
||||
/// drop-ins), `start_with_fallback`, MCP listener registration, and
|
||||
/// the manager kick. Fanned out by a [`NodeKind::Reconcile`] that
|
||||
/// observed `wanted = Up` and the container down.
|
||||
Start,
|
||||
/// Mechanical container stop: `nixos-container` kill, MCP listener
|
||||
/// unregister, and the `Killed` manager notify. Fanned out by a
|
||||
/// [`NodeKind::Reconcile`] that observed `wanted = Offline` and up.
|
||||
Stop,
|
||||
/// Mechanical `nixos-container stop` for the profile swap. Never
|
||||
/// touches `wanted`. Noop if already stopped.
|
||||
StopForUpdate,
|
||||
|
|
@ -125,6 +136,8 @@ impl NodeKind {
|
|||
NodeKind::Create => "create",
|
||||
NodeKind::MetaLock { .. } => "meta_lock",
|
||||
NodeKind::Reconcile => "reconcile",
|
||||
NodeKind::Start => "start",
|
||||
NodeKind::Stop => "stop",
|
||||
NodeKind::StopForUpdate => "stop_for_update",
|
||||
NodeKind::Signal => "signal",
|
||||
NodeKind::Drain => "drain",
|
||||
|
|
|
|||
Loading…
Reference in a new issue