You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@livy.apache.org by "Soumyadeep Roy (Jira)" <ji...@apache.org> on 2026/09/17 06:38:00 UTC
[jira] [Created] (LIVY-1084) Prefer spark container exit status over pod phase when sidecars are enabled
Soumyadeep Roy created LIVY-1084:
------------------------------------
Summary: Prefer spark container exit status over pod phase when sidecars are enabled
Key: LIVY-1084
URL: https://issues.apache.org/jira/browse/LIVY-1084
Project: Livy
Issue Type: Bug
Reporter: Soumyadeep Roy
When livy.server.kubernetes.spark.sidecar.enabled is true, SparkKubernetesApp.KubernetesAppReport.getDriverState returns the raw pod phase whenever the phase isn't "running", before ever consulting the spark container's own termination status. A sidecar container that fails or gets OOMKilled after the spark driver container has already exited successfully can flip the pod phase to "Failed", which Livy then reports as the terminal application state even though the actual Spark job succeeded.
Fix: when sidecars are enabled, always consult getTerminalState (the spark container's own exit code) first, and only fall back to the pod phase if the spark container cannot be found in the pod's container statuses. Also guard against getContainerStatuses() returning null, which happens while the pod is still in the Pending phase, to avoid an NPE.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)