pushpavanthar opened a new pull request, #60253:
URL: https://github.com/apache/spark/pull/60253

   ### What changes were proposed in this pull request?
   
   Add a `PodUnschedulable(pod, message)` executor pod state. 
`ExecutorPodsSnapshot.toState` returns it instead of `PodPending` when a 
pending pod carries the `PodScheduled=False, reason=Unschedulable` condition; 
`message` is the scheduler's explanation (for example `0/3 nodes are available: 
3 Insufficient cpu.`).
   
   Both `PodPending` and `PodUnschedulable` extend a new sealed 
`PendingPodState`, and `ExecutorPodsAllocator` counts `PendingPodState` where 
it counted `PodPending` before, so allocation, pending-pod limits and 
excess-pod cleanup are unchanged. The allocator additionally logs a warning 
with the scheduler's message the first time an executor pod is seen 
unschedulable.
   
   ### Why are the changes needed?
   
   Today an executor pod that the scheduler cannot place looks exactly like one 
that is about to start: both are `PodPending`. When executors do not come up, 
the driver log says nothing about why and the only way to find out is `kubectl 
describe pod`. Surfacing the scheduler's reason in the driver log makes 
capacity and taint problems visible where users look first. The distinct state 
is also the hook the SPIP in SPARK-61258 builds on.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No behaviour change in allocation. One new warning log line per executor pod 
that becomes unschedulable, carrying the scheduler's message.
   
   ### How was this patch tested?
   
   - `ExecutorPodsSnapshotSuite`: an unschedulable pending pod maps to 
`PodUnschedulable` and carries the condition message; a plain pending pod still 
maps to `PodPending`.
   - `ExecutorPodsAllocatorSuite`: an unschedulable pod counts as pending and 
does not trigger an extra pod request.
   - Existing suites in the `kubernetes` module pass.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Fable 5.1), reviewed and verified by the author.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to