Executor reconciliation and reporting
The executor reconciliation and reporting system keeps Armada's view of a job run aligned with Kubernetes. It watches managed pods and nodes, checks that each leased run has a valid workload, measures cluster capacity and pod use, and sends state and outcome events back to Armada services. This page complements the executor runtime overview.
Reconciliation model
The executor uses two linked views of work: Kubernetes is the source for pod and node facts, while an in-memory run state tracks the handoff from lease to submitted workload. Reconciliation finds gaps between these views so that a missing pod does not leave a run stuck forever and an unassigned run can return to the scheduler.
Run state alignment
The run state store records the small set of phases needed to manage a run locally: leased, submitted, failed submission, active, invalid, or missing. Pod add events restore active state after an executor restart, and the store keeps cancellation and preemption requests until the matching pod action completes (home/…/job_run_state_store.go• L15-27, home/…/job_run_state_store.go• L43-65).
The reconciliation pass compares active or successfully submitted runs with managed pods. A submitted run with no pod is removed from local state after its submission deadline so the scheduler can lease it again. An active run with no pod becomes a terminal internal failure after its missing-pod deadline. A later pod or run-state change clears the issue before that deadline (home/…/pod_issue_handler.go• L845-906, home/…/pod_issue_handler.go• L909-937).
flowchart LR
L[Leased run] --> S[Pod submission]
S --> P[Managed pod observed]
P --> A[Active run state]
S -. pod not observed .-> R[Remove local state]
A -. pod missing beyond deadline .-> F[Report internal failure]
A --> T[Pod reaches terminal phase]
T --> E[Report outcome]
References: home/…/job_run_state_store.go• L15-27 home/…/job_run_state_store.go• L80-120 home/…/pod_issue_handler.go• L845-937
Pod identity and scope
The executor treats a pod as an Armada workload when it has Armada job identity labels. The job ID and run ID connect Kubernetes state to Armada events, while queue, job set, pod number, and pool data provide the context used in scheduling and reporting (home/…/pod_util.go• L56-80, home/…/pod_util.go• L105-143).
The Kubernetes context maintains informer views for pods, nodes, events, services, ingresses, and endpoint slices. It also keeps short-lived records for pods submitted before the informer sees them. This lets reconciliation cover both newly submitted work and work already visible in the cluster (home/…/cluster_context.go• L47-74, home/…/cluster_context.go• L103-163, home/…/cluster_context.go• L191-241).
References: home/…/pod_metadata.go• L3-16 home/…/pod_util.go• L64-80 home/…/cluster_context.go• L47-74 home/…/cluster_context.go• L191-214
Job and pod handling
Job handling moves scheduler leases into Kubernetes pods and then turns pod changes into Armada events. The executor does not report every Kubernetes update; it reports meaningful phase changes and uses annotations to remember which states it has already sent.
Lease and submission flow
The executor asks the scheduler for work by sending its free capacity, node descriptions, and run IDs that are known locally but not assigned to a node. The scheduler returns new leases plus cancellation and preemption instructions. The executor stores valid leases, submits their pods, and reports submission failures according to whether the failure can be retried (home/…/job_requester.go• L54-100, home/…/lease_requester.go• L51-101).
When a pod is submitted, related services and ingresses are created as part of the same workload. A recoverable submission failure returns the lease so the scheduler can try again. An unrecoverable failure reports a failed run instead. The executor removes objects it created during a failed submission, but a partially created group can still need normal cleanup (home/…/submit.go• L47-55, home/…/submit.go• L84-107, home/…/cluster_allocation.go• L89-135).
sequenceDiagram
participant E as Executor
participant A as Armada scheduler
participant K as Kubernetes
E->>A: Send capacity and node state
A-->>E: Lease, cancel, and preempt instructions
E->>K: Create pod and related resources
K-->>E: Pod lifecycle events
E-->>A: Submission result or run state events
References: home/…/job_requester.go• L54-100 home/…/lease_requester.go• L51-101 home/…/submit.go• L84-147 home/…/cluster_allocation.go• L47-135
Cancellation and preemption
Cancellation and preemption arrive from the scheduler through the lease stream and become requests on local run state. The executor then deletes the matching active pods. Preemption reports a preempted event and a failed outcome before deletion, while cancellation leaves a completed and already reported pod in place for inspection (home/…/job_requester.go• L159-169, home/…/preempt_runs.go• L40-110, home/…/remove_runs.go• L44-79).
The delete path marks a pod before sending the delete request. This marker prevents an intentional delete from being mistaken for an external failure and stops the normal phase reporter from sending a false failure. Repeated deletion attempts can force-kill a pod after the configured kill period. If an executor-marked pod remains past that period, issue handling can queue one diagnostic termination event instead of treating the deliberate deletion as a job failure. The event is sent at most once for each run and does not block the issue loop (home/…/cluster_context.go• L312-364, home/…/cluster_context.go• L366-446, home/…/pod_issue_handler.go• L402-452).
References: home/…/job_requester.go• L159-169 home/…/preempt_runs.go• L40-110 home/…/remove_runs.go• L44-79 home/…/cluster_context.go• L312-364 home/…/pod_issue_handler.go• L402-452
Pod status reporting
The job state reporter converts a managed pod's phase into an Armada event. Pod add events report the current phase, while pod updates report only phase changes. Pending and running events identify the pod and its placement. Succeeded events close the run, while failed events carry a failure reason, failure classification, and available container, node, and Kubernetes event data (home/…/job_state_reporter.go• L59-97, home/…/job_state_reporter.go• L110-180, home/…/event.go• L18-126).
The event forms also cover ingress addresses, lease returns, preemption, and diagnostic data for a run that is torn down before its workload completes. A lease-return event remains terminal for the current attempt, while the scheduler decides whether to lease the job again. A termination debug event is diagnostic only and does not change the run state (home/…/event.go• L147-219, home/…/event.go• L266-287, home/…/event.go• L325-367).
When startup timing capture is enabled, a running pod also produces a startup breakdown from its Kubernetes events and status. The breakdown can show pod creation, scheduler binding, kubelet acknowledgement, sandbox readiness, application start, container image pulls, and configured site-specific steps. Scheduler binding uses the scheduler event when available, while sandbox readiness can use the earliest container event when the pod condition is late. The application start point is the latest first start across application containers, including a prior container incarnation after a restart (home/…/timings.go• L10-46, home/…/podtimes.go• L16-76).
The timing reader accepts both Kubernetes event timestamp forms and keeps the earliest relevant occurrence for the normal anchors. It also fills image size from node data when a cached-image event has no size. The reporter skips timing collection when the feature is disabled or the pod is not running. Event and node lookup are best effort, so the pod's own state can still produce a status event when timing inputs are missing (home/…/events.go• L46-115, home/…/containers.go• L16-63, home/…/job_state_reporter.go• L110-136).
The reporter uses phase annotations as an idempotency mark. It sends a phase only once, skips phases caused by an executor-requested deletion, and periodically retries states that have no report after a delay. A failure metric is recorded only after Armada accepts the event, so delivery errors do not count as reported failures. For workloads with ingress, it waits until the expected services and ingresses exist before it reports their reachable addresses (home/…/job_state_reporter.go• L85-97, home/…/job_state_reporter.go• L164-180, home/…/job_state_reporter.go• L203-228, home/…/job_state_reporter.go• L230-267).
For failed pods, the reporter uses the same failure inputs as pod issue handling. If issue handling already owns the run, the reporter waits so that only one path emits the terminal result. If issue detection returns an error, the reporter still sends the terminal failure event. A successful event send records the failure metric and marks the pod state as reported. Debug data is added when the application container never started or when it ran for at least the configured runtime threshold. A short-lived application failure does not add this extra data (home/…/job_state_reporter.go• L99-108, home/…/job_state_reporter.go• L128-180, home/…/job_state_reporter_test.go• L158-228, home/…/job_state_reporter_test.go• L382-456).
References: home/…/job_state_reporter.go• L53-97 home/…/job_state_reporter.go• L99-180 home/…/job_state_reporter.go• L187-228 home/…/job_state_reporter.go• L230-287 home/…/job_state_reporter_test.go• L130-228 home/…/job_state_reporter_test.go• L382-471 home/…/event.go• L18-126 home/…/event.go• L147-219 home/…/event.go• L266-367 home/…/timings.go• L10-46 home/…/podtimes.go• L16-129 home/…/events.go• L46-153
Pod admission and startup checks
Pod admission and startup checks decide whether a pending workload should wait, return its lease, or fail. They cover failures that may appear in pod status, container status, or Kubernetes events before an application container starts.
Pending pod checks
The pending checker looks for a node assignment, status progress, event signals, and slow init containers. It waits during the configured grace periods. It returns a retry action when scheduling or node progress is unlikely to recover, and it returns a failure action for an unrecoverable startup problem such as an init container that exceeds its deadline (home/…/pod_checks.go• L18-50, home/…/pod_checks.go• L53-109).
The issue handler applies these checks only to managed pods in pending or unknown phases. It captures the failure category when it detects the issue, using the pod state, the failure message, and the Kubernetes events available at that time. A retryable issue deletes the pod before it returns the lease. A non-retryable issue reports a failed run and then cleans up the pod. If the pod starts while deletion is in progress, the executor changes the result to a non-retryable internal error rather than allowing the old pod and a retry to overlap (home/…/pod_issue_handler.go• L314-397, home/…/pod_issue_handler.go• L535-616, home/…/pod_issue_handler.go• L711-777).
References: home/…/types.go• L9-58 home/…/pod_checks.go• L53-109 home/…/pod_issue_handler.go• L314-397 home/…/pod_issue_handler.go• L535-616 home/…/pod_issue_handler.go• L711-777
Failed pod checks
Failed pod checks decide if a pod failure is safe to retry. If any container started, the check uses failed container state. If no container started, it uses pod events and then pod status. This order captures both runtime failures and failures that Kubernetes reports before a container has useful exit data (home/…/pod_checks.go• L9-16, home/…/pod_checks.go• L40-65).
The failed-pod retry check has precedence over a category's delete action. This keeps the older retry contract stable while categories are added. Only a failed pod that the retry check does not claim can enter the category-driven delete path (home/…/pod_issue_handler.go• L204-238, home/…/pod_issue_handler_test.go• L1272-1308).
References: home/…/types.go• L54-74 home/…/pod_checks.go• L19-65 home/…/pod_status_checks.go• L21-56 home/…/pod_issue_handler.go• L204-238 home/…/pod_issue_handler_test.go• L1272-1308
Failed pod disposition
The executor distinguishes a failed pod's outcome from its pod retention policy. Failed-pod retry checks take precedence, then a matching category can request deletion. A retryable failure returns the lease after the failed pod is gone. A terminal failure reports the run as failed before cleanup; if reporting fails, the issue and pod remain for a later pass. A categorized failure with a delete action is reported only after the pod disappears, which avoids reusing the pod name while the old object still exists (home/…/pod_issue_handler.go• L202-252, home/…/pod_issue_handler.go• L541-605, home/…/pod_issue_handler.go• L638-691).
If a delete-action pod cannot disappear within the stuck-termination period, the executor attempts one terminal internal failure report instead of returning a lease. Deletion continues even if that escalation report fails. If the pod then disappears, the executor reports the original categorized failure and resolves the issue. This keeps the retry safe and lets a later pass recover from a temporary report failure (home/…/pod_issue_handler.go• L615-661, home/…/failure_report_recovery_test.go• L54-106).
Failed pods that remain in the cluster can preserve logs and diagnostics. The resource cleanup pass later removes only pods whose terminal state was reported and whose age is safe for removal. It also limits the total retained terminal pods while sharing early removal across queues (home/…/resource_cleanup.go• L88-123, home/…/resource_cleanup.go• L180-200).
References: home/…/types.go• L19-43 home/…/pod_issue_handler.go• L202-252 home/…/pod_issue_handler.go• L541-605 home/…/pod_issue_handler.go• L615-691 home/…/resource_cleanup.go• L88-123 home/…/pod_issue_handler_test.go• L1355-1473 home/…/failure_report_recovery_test.go• L20-106
Failure categories and diagnostics
Failure categorization adds a stable category, subcategory, optional user hint, and pod disposition to executor failure events. It helps downstream services group failures while the scheduler keeps a separate decision about whether a run may retry.
Failure classification
The classifier evaluates configured rules in order and uses the first match. Each rule uses one signal: Kubernetes conditions, non-zero exit codes, termination messages, executor-captured pod errors, or Kubernetes events. A rule can also add a user-facing hint to the event message. Pod-level error and event rules cover failures that have no useful container state, such as admission rejection or a device-plugin error (home/…/classifier.go• L44-77, home/…/classifier.go• L149-265, home/…/doc.go• L8-33).
Container rules explain failures with non-zero container state from regular and init containers. Pod-level rules cover failures such as image pull errors, missing resources, stuck termination, and admission errors where container state is absent. Event rules are important for kubelet and device-plugin admission failures because those signals may exist only in Kubernetes events. Events are read when the issue is detected, so a later event cannot change that classification. For a delete-action check, failure classification still runs when event retrieval fails; it uses the pod and extracted failure reason, while event-based matches and event debug data are unavailable (home/…/types.go• L45-83, home/…/doc.go• L13-33, home/…/pod_issue_handler.go• L218-252).
Configuration is checked before classification. Rules must have one valid matcher, category names must fit the downstream field limit, and Armada-reserved names cannot be used for operator categories. When no rule matches, the configured default category is used and the pod is retained (home/…/classifier.go• L82-147, home/…/classifier.go• L149-236).
The classifier's category action controls whether the executor retains or deletes the failed pod. It does not decide the scheduler's retry policy. A matched hint is added to the failure message, while a delete action removes the failed pod before the executor reports a retryable outcome. That separation lets operators keep useful user-error pods for logs while deleting narrow infrastructure failures that must be removed before a retry (home/…/types.go• L19-43, home/…/pod_issue_handler.go• L638-709).
References: home/…/classifier.go• L44-77 home/…/classifier.go• L82-147 home/…/classifier.go• L149-309 home/…/types.go• L19-83 home/…/doc.go• L8-33 home/…/pod_issue_handler.go• L202-252 home/…/pod_issue_handler.go• L626-709 home/…/job_state_reporter_test.go• L232-275 home/…/pod_issue_handler_test.go• L876-938
Failure causes
Failure events carry a Kubernetes cause that gives downstream consumers a broad reason for the terminal state. The executor maps eviction and deadline conditions directly, maps out-of-memory termination to an OOM cause, and uses application error when no more specific cause is present (home/…/pod_status.go• L18-60).
The event also carries terminated container details when available. Debug data is captured when an application container never started or when a failed workload ran for at least the configured runtime threshold. A short-lived application failure does not add this extra data. The payload can include selected pod state, node state, and recent Kubernetes events (home/…/job_state_reporter.go• L99-108, home/…/debug.go• L49-73, home/…/debug.go• L185-234).
Category-driven deletion keeps the pod's original Kubernetes cause when it later reports the failure. If deletion itself becomes the problem, the executor changes the result to the internal stuck-terminating category so the event describes the actual unsafe state (home/…/pod_issue_handler.go• L661-672, home/…/pod_issue_handler.go• L685-709, home/…/pod_issue_handler_test.go• L1322-1353).
References: home/…/pod_status.go• L18-99 home/…/job_state_reporter.go• L99-155 home/…/debug.go• L49-73 home/…/debug.go• L185-234 home/…/job_state_reporter_test.go• L181-228 home/…/pod_issue_handler.go• L661-709 home/…/pod_issue_handler_test.go• L1322-1353
Node and resource tracking
Node and resource tracking turns Kubernetes capacity into the scheduler's view of what the executor can accept. It accounts for node health, scheduling controls, existing Armada work, and non-Armada work before the executor asks for more leases.
Node eligibility
The executor marks a node as available for Armada processing when it is not unschedulable and has no untolerated NoSchedule taint. It groups nodes by a configured type and assigns each node to a pool. A node type can come from a label or from its recognized taints. Reserved nodes can use a reserved pool suffix so scheduler placement stays separate from the normal pool (home/…/node_group.go• L18-25, home/…/node_group.go• L81-110, home/…/node_group.go• L134-160).
Well-known taints can both permit processing and identify a node group. Other NoSchedule taints make the node unavailable. The node report still exposes all taints and can add categories for recognized or configured unknown taints so the scheduler can distinguish placement limits from node metadata (home/…/node_group.go• L94-155, home/…/cluster_utilisation.go• L118-135).
References: home/…/node_group.go• L18-25 home/…/node_group.go• L54-78 home/…/node_group.go• L81-110 home/…/node_group.go• L134-160 home/…/node_group_test.go• L23-160 home/…/node_group_test.go• L210-349
Capacity accounting
For each node, the executor starts with Kubernetes allocatable resources and subtracts requests from non-terminal pods. It reports total, available, taints, labels, pool, node type, and Armada run states to the scheduler. It includes managed pods that are not yet assigned to a node when they target the processing-node set. It excludes unavailable nodes from the cluster-wide free capacity while still exposing their state (home/…/cluster_utilisation.go• L76-143, home/…/cluster_utilisation.go• L161-195).
Non-Armada pods reduce capacity even though Armada does not own them. The executor reports their allocation by priority and can add a configured minimum reservation when observed non-Armada requests are too low. This protects scheduler decisions from treating recurring platform workloads as free capacity (home/…/cluster_utilisation.go• L212-232, home/…/cluster_utilisation.go• L237-257, home/…/cluster_utilisation.go• L441-471).
The node report also includes Armada resource use by queue and pool. This gives the scheduler both a placement view and a fair-share view of current work (home/…/cluster_utilisation.go• L364-406).
References: home/…/cluster_utilisation.go• L64-143 home/…/cluster_utilisation.go• L161-232 home/…/cluster_utilisation.go• L237-257 home/…/cluster_utilisation.go• L342-406 home/…/cluster_utilisation.go• L419-471 home/…/cluster_utilisation_test.go• L25-77 home/…/cluster_utilisation_test.go• L240-307 home/…/cluster_utilisation_test.go• L389-627
Lease admission
The executor sends capacity and node state through the LeaseJobRuns stream. The scheduler uses that report to return work that fits the available cluster view, and the same exchange acts as the executor's liveness signal. If a health monitor marks the cluster unhealthy, the executor stops requesting more work until health returns (home/…/executorapi.proto• L54-72, home/…/executorapi.proto• L106-116, home/…/cluster_allocation.go• L47-57).
The executor includes locally known run IDs that have no node assignment. This tells the scheduler about work that needs reconciliation instead of treating the reported capacity as available for unrelated new work (home/…/job_requester.go• L77-121).
References: home/…/executorapi.proto• L13-37 home/…/executorapi.proto• L54-72 home/…/executorapi.proto• L106-116 home/…/job_requester.go• L77-121 home/…/cluster_allocation.go• L47-57
Utilization reporting
Utilization reporting measures what managed pods use while they run and sends both scheduler-facing capacity data and job-facing usage history. It keeps current usage separate from cumulative usage so the scheduler can make near-term decisions while history can show the full run.
Pod usage collection
The executor refreshes usage for nodes that can host Armada work and nodes that still host active Armada pods. It skips nodes that are not ready because their kubelet is unlikely to answer, while a short grace period keeps recent terminal pods eligible for final metrics (home/…/pod_utilisation.go• L87-129, home/…/pod_utilisation.go• L131-163).
Kubelet stats provide CPU, memory, and ephemeral storage use. Optional custom Prometheus metrics add workload-specific resources by matching samples to pod names and applying a sum or mean aggregation (home/…/pod_utilisation_kubelet_metrics.go• L23-68, home/…/pod_utilisation_custom_metrics.go• L30-70).
References: home/…/pod_utilisation.go• L20-35 home/…/pod_utilisation.go• L87-163 home/…/pod_utilisation_kubelet_metrics.go• L23-68 home/…/pod_utilisation_custom_metrics.go• L30-90
Usage event reporting
The utilization event reporter samples running pods over time and aggregates each reporting period into maximum, average, and cumulative values. It sends a final report when a pod reaches a terminal phase, then drops the pod from its active reporting set (home/…/job_utilisation_reporter.go• L17-31, home/…/job_utilisation_reporter.go• L79-145).
Usage events are sent through the same event path as job state events. The event reporter holds a partial batch until it reaches the configured size or the periodic flush occurs. The event sender compacts sequences and splits them to respect the configured message limit, while the queue retries usage sends when the first attempt fails (home/…/job_event_reporter.go• L14-18, home/…/job_event_reporter.go• L55-120, home/…/job_event_reporter_test.go• L23-61, home/…/event_sender.go• L35-63).
References: home/…/job_utilisation_reporter.go• L79-159 home/…/resources.go• L28-105 home/…/job_event_reporter.go• L55-135 home/…/job_event_reporter_test.go• L23-61 home/…/event_sender.go• L35-94 home/…/event.go• L370-403
Armada status interfaces
The executor uses two Armada-facing interfaces for this area: a streaming lease interface for capacity and control instructions, and an event interface for run state, failures, ingress data, diagnostics, and utilization. Both interfaces preserve the link between a Kubernetes object and an Armada job run.
Scheduler interface
LeaseJobRuns lets the executor send a snapshot of resources, nodes, and local run placement. The response can grant leases or ask the executor to cancel or preempt specific runs. ReportEvents accepts the event sequences produced by pod and utilization handling (home/…/executorapi.proto• L50-72, home/…/executorapi.proto• L74-103, home/…/executorapi.proto• L106-116).
References: home/…/executorapi.proto• L50-72 home/…/executorapi.proto• L74-103 home/…/executorapi.proto• L106-116
Event delivery
The event reporter queues asynchronous state and utilization events and sends them in bounded batches. A partial batch waits for the batch interval, while a full batch sends at once. Direct reports are used when an operation must complete before the executor continues, such as returning a lease after cleanup or reporting preemption before deletion. The callback removes pending state only after the batch send finishes (home/…/job_event_reporter.go• L55-120, home/…/job_event_reporter_test.go• L23-61).
The event sender compacts event sequences, splits large payloads, and calls Armada's ReportEvents endpoint with a bounded request time. This makes reporting a shared delivery boundary for scheduler state and downstream history services (home/…/event_sender.go• L20-63).
References: home/…/job_event_reporter.go• L55-135 home/…/job_event_reporter_test.go• L23-61 home/…/event_sender.go• L20-63 home/…/application.go• L181-213
Change checklist
When these files or sections are changed, remember to consider these:
- Keep pod identity labels and event extraction aligned. A change to job or run identity affects state reconciliation, node reports, event creation, and utilization grouping.
- Keep the scheduler's
NodeInforesource fields aligned with capacity accounting. Changes to non-Armada reservations or node eligibility can alter both lease decisions and queue usage views. - Preserve the ordering between pod deletion and return-lease or terminal failure events. A retry must not reuse a pod name while the old pod still exists.
- Keep state-report annotations aligned with retry logic. A missing annotation can duplicate an event, while a premature annotation can hide a run state from Armada.
- Keep failure category names, subcategories, hints, actions, and event fields as downstream data contracts. Lookout and other event consumers use them for grouping and user-facing error text.
- Keep classifier rule order and matcher scope aligned with the failure signals supplied by both the state reporter and issue handler. A change can alter category results for the same pod or make a delete action unsafe.
- Keep failed-pod retry checks ahead of category delete actions. Reversing this order can change a lease return into a terminal failure.
- Keep failure cause data from the original pod when a category delete action delays reporting. Replacing it with a generic cause loses the reason that downstream users need.
- Keep failure metrics tied to successful event delivery. Counting before the event is accepted can overstate reported failures during a send error.
- Keep failed-pod issue state until a failed event is accepted. Deleting the pod or clearing the issue after a failed report can lose the only later retry of that event.
- Keep startup timing collection optional and limited to running pods. Preserve the timestamp source order for scheduler binding and sandbox readiness, and treat missing event or node data as partial timing data rather than a status-reporting failure.
- Keep node labels, taint recognition, node type grouping, and reserved pool naming aligned. A change can move work to a different scheduler pool or make a node appear eligible when it is not.
- Keep managed pending pods and node-selector placement in capacity and run-state reports. Dropping them can make the scheduler see capacity that is already committed.
- Keep usage metric names and aggregation rules aligned with the
ResourceUtilisationevent fields. A change can silently alter scheduler or history values without changing pod state. - Preserve bounded event delivery. Changes to event batch size or message splitting must remain compatible with the executor API message limit.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| A submitted run does not appear in Kubernetes before its deadline | Local state is removed so the scheduler can lease the run again | Submitted-pod reconciliation deadline in StateChecksConfiguration |
| An active run loses its pod beyond the missing-pod deadline | Armada receives an internal pod-missing failure instead of an indefinitely active run | Active-pod reconciliation in PodIssueHandler |
| A pending pod has no node or no status progress beyond its check deadline | The lease is returned or the run fails according to the configured check action | Pending pod checks and issue handling |
| A failed pod matches a delete-action category but cannot be deleted | The executor fails it as stuck terminating instead of returning a lease that could collide with the old pod | Delete confirmation and stuck-terminating expiry |
| A failed pod matches both a retry check and a delete-action category | The failed-pod retry path wins and returns the lease rather than applying category deletion | Failed-pod check precedence |
| A non-retryable failure report is rejected | The pod and issue remain, and the failure metric is not recorded until a later pass | Mark reported and delete only after successful event delivery |
| A delete-action escalation report is rejected while the pod is stuck | Deletion still proceeds; after the pod is gone the original categorized failure is reported instead of losing the run | Continue deletion and retain the issue until pod disappearance |
| A pod is deleted by an external actor or node failure | The run is reported as an external deletion failure | Pod delete event handling and terminal-state marker checks |
A node is unschedulable or has an untolerated NoSchedule taint | Its capacity is excluded from new Armada leases | Node availability filtering |
| A managed pod is pending without a node assignment or has a node selector that matches no known node | Its run may be missing from node placement state while its resource request still affects capacity accounting | Managed-pod inclusion and node-selector mapping |
| A kubelet or custom metrics endpoint does not respond | Some utilization fields remain empty for that refresh | Node readiness filtering and per-source best-effort collection |
| Startup timing event or node lookup fails for a running pod | The normal running-state event is still reported with partial or no startup timing data | Optional timing capture and best-effort input retrieval |
| A state event cannot be delivered | The pod stays unmarked and its failure metric is not recorded until a later report succeeds | Successful event delivery precedes the state annotation and failure metric update |
| An event batch exceeds the API message limit | Status or utilization reporting fails for that batch | Sequence compaction and byte-limited event splitting |
| A category rule is invalid or uses a reserved name | The classifier cannot load, so configured failure classification is unavailable | Up-front classifier validation |
| A retryable failed pod is still present when the lease is returned | A new attempt can collide with the old pod name or workload | Delete the failed pod before reporting the return-lease event |
Key files
| File | Why to read it |
|---|---|
| internal/…/application.go | Shows how reconciliation, capacity, reporting, cleanup, and background tasks work together. |
| internal/…/pod_issue_handler.go | Defines missing-pod reconciliation, startup checks, failed-pod precedence, retry decisions, categorization, deletion ordering, and termination diagnostics. |
| internal/…/failure_report_recovery_test.go | Shows the recovery contract when failure reporting fails during normal handling or delete-action escalation. |
| internal/…/job_state_reporter.go | Defines the pod phase to Armada status flow, optional startup timing data, failure debug capture, and idempotent retry behavior. |
| internal/…/timings.go and internal/…/podtimes.go | Defines the startup breakdown attached to running-state reports and the Kubernetes anchors used to measure it. |
| internal/…/events.go | Defines how Kubernetes event timestamps and container event identities support startup measurements. |
| internal/…/job_run_state_store.go | Explains the executor's local run state and how Kubernetes restores active runs. |
| internal/…/job_requester.go | Connects capacity reports and scheduler lease responses to local run state. |
| internal/…/cluster_utilisation.go | Defines node capacity, non-Armada reservations, queue usage, and scheduler-facing node reports. |
| internal/…/pod_utilisation.go | Defines which nodes and pods are eligible for usage collection. |
| internal/…/job_utilisation_reporter.go | Shows how per-pod usage becomes periodic and final Armada events. |
| internal/…/node_group.go | Defines node eligibility, type grouping, pool assignment, and taint handling. |
| internal/…/pod_checks.go | Defines pending pod admission and startup decisions. |
| internal/…/classifier.go | Defines failure categories, rule order, validation, hints, and pod disposition. |
| internal/…/types.go | Defines category actions and the signals that operator rules can match. |
| internal/…/doc.go | Explains the operator-facing failure category model and its supported failure signals. |
| internal/…/event.go | Defines the event forms used for status, failure, diagnostics, ingress, lease return, preemption, and utilization. |
| internal/…/job_event_reporter.go | Defines asynchronous event batching and delivery timing. |
| internal/…/job_event_reporter_test.go | Demonstrates full-batch and timer-based event flush behavior. |
| internal/…/event_sender.go | Defines the final event delivery boundary to Armada and payload size handling. |
| pkg/…/executorapi.proto | Defines the scheduler-facing lease and event reporting contracts. |