Skip to main content

pod_failure_intent

Function pod_failure_intent 

Source
pub fn pod_failure_intent(code: i32) -> &'static str
Expand description

The podFailurePolicy intent a control plane compiles each exit code into. agentd emits the code; agentctl owns the actual FailJob/Ignore/Count choice and any operator override — this is the frozen hint it branches on, not a policy.

The five intents:

  • complete0: not a failure; never retry.
  • terminal — config/semantic error; a retry never helps ⇒ FailJob.
  • retriable — usually transient ⇒ left to backoffLimit (Count).
  • policy — default Count, but the operator’s --budget-exit-code remap is honoured when present.
  • infra — kernel-set kill (OOM / ungraceful SIGTERM); the fix is a resource or config change (memory, grace period), so it is never authored as a retry rule — retrying reproduces the same kill.

An unrecognised code defaults to retriable — the conservative posture: an unknown failure is treated like a generic one and left to the backoff limit, never silently FailJob’d. (A code outside the contract should not occur at the frozen EXIT_CODES major; this is belt-and-suspenders for a future additive code an older agentctl has not learned.)