-
Notifications
You must be signed in to change notification settings - Fork 43k
scheduler: output PreEnqueue failures to users #130668
Copy link
Copy link
Open
Labels
kind/featureCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.sig/schedulingCategorizes an issue or PR as relevant to SIG Scheduling.Categorizes an issue or PR as relevant to SIG Scheduling.triage/acceptedIndicates an issue or PR is ready to be actively worked on.Indicates an issue or PR is ready to be actively worked on.
Metadata
Metadata
Assignees
Labels
kind/featureCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.sig/schedulingCategorizes an issue or PR as relevant to SIG Scheduling.Categorizes an issue or PR as relevant to SIG Scheduling.triage/acceptedIndicates an issue or PR is ready to be actively worked on.Indicates an issue or PR is ready to be actively worked on.
Type
Projects
Status
Needs Triage
What would you like to be added?
Raised at #129698 (comment).
We should somehow tell end-users (i.e., not the cluster admin who has access to the scheduler logs) why pods are pending if
PreEnqueuehas been rejecting those pods.That being said, we cannot simply make API calls for kube-apiserver within the scheduling queue because the queue is very performance sensitive.
Why is this needed?
Currently, when PreEnqueue rejects pods, pods are just kept in the scheduling queue without any visible changes to pod objects. i.e., users cannot see why pods are pending at pod condition, status, events etc. The only way to figure out is to look at the scheduler's logs.
The scheduling gate feature is avoiding this problem at kube-apiserver; add a condition to pods if the scheduling gate is specified.
kubernetes/pkg/registry/core/pod/strategy.go
Line 821 in 3f26d00
We cannot do the same for any PreEnqueue plugins in general because kube-apiserver doesn't know which pods will be rejected by the scheduler's PreEnqueue plugins.