Expand description
The instance state machine and the bounded-restart policy (ADR-099
section 7). Pure: no I/O, no clock of its own (callers pass now_ms), so
every rule is table-testable.
The same states serve both sides. A node’s workload-host walks an
instance through Loaded, Running, Unhealthy, Restarting, Failed
and the teardown states; the controller adds Lost (its node is
Dead) and Rescheduled (a replacement was placed elsewhere).
Structs§
- Illegal
Transition - A step that is not allowed.
- Instance
Life - One instance’s life on one side of the wire.
- Lifecycle
Policy - Operator-visible lifecycle settings of one placement.
- Restart
Policy - Bounded restarts: at most
max_restartsinsidewindow_ms, spaced by an exponential backoff.
Enums§
- Lifecycle
State - Where an instance is in its life.
- Restart
Decision - What to do about an unhealthy instance right now.
Functions§
- can_
transition - Whether
from -> tois a legal step. - needs_
attached_ hardware - Whether
specneeds something attached to (or local to) a particular node: any requirement in [HARDWARE_NAMESPACES]. Such a workload’s data source is tied to its node, so moving it is not a failover; it is held and alerted instead. An allow-list: a new namespace never pins by accident.