jobq: key transient tombstones per pill, not per agent
Deletes `TransientState`, adds `transient_kind` to `TransientCleared`, and fixes a crash misreport — three changes over the same functions. `TransientState` was `RunningTransient` with `agent` dropped and `takes_container_down` renamed; that rename was the only thing it did, and its three consumers each read a disjoint subset. `transient_snapshot` now returns `RunningTransient` directly. `recent_transient` was keyed by agent alone and overwritten on each clear. An agent can clear several pills in one grace window, so a `Prebuild` (`takes_container_down = false`) landing after a `StopForUpdate` (`true`) left the tombstone reading `false` and the crash watcher reported a deliberate stop as a container crash. Keyed by `(agent, label)` now, with `recent_transient_within` folding back per agent by OR — the same question `crash_watch` asks of the active set. `TransientCleared` gains the label for the same reason: a client holding two open pills for one agent could not tell which one a clear referred to. The out-of-band suppression guard has no node and so no label; it uses `NO_NODE_LABEL`, angle-bracketed to stay out of the `NodeKind::as_str` namespace.
This commit is contained in:
parent
6a8a729f58
commit
7ef0e8c788
6 changed files with 110 additions and 53 deletions
|
|
@ -533,7 +533,7 @@ fn build_port_conflicts(containers: &[ContainerView]) -> Vec<PortConflict> {
|
|||
/// `ContainerView.pending` inline; this list only catches pre-creation.
|
||||
fn build_transient_views(
|
||||
containers: &[ContainerView],
|
||||
transient_snapshot: &std::collections::HashMap<String, Vec<crate::coordinator::TransientState>>,
|
||||
transient_snapshot: &std::collections::HashMap<String, Vec<crate::job_queue::RunningTransient>>,
|
||||
) -> Vec<TransientView> {
|
||||
transient_snapshot
|
||||
.iter()
|
||||
|
|
|
|||
Loading…
Reference in a new issue