Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the skip return status support for PreEnqueue, and won't run PreFilter if PreEnqueue returned a Skip status #120237

Closed
zhuqi-lucas opened this issue Aug 29, 2023 · 13 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling.

Comments

@zhuqi-lucas
Copy link

What would you like to be added?

Add the skip return status support for PreEnqueue, and won't run PreFilter if PreEnqueue returned a Skip status

Why is this needed?

We have skip status for PreFilter to return, and when we skip prefilter, the following filter will not run, but we don't have skip choice for PreEnqueue, we'd better add this.

After we support this:
When we skip for the preEnqueue, we can skip add the pod to activeQueue, it's more reasonable and saving time for plugin customer scheduler to optimize.

@zhuqi-lucas zhuqi-lucas added the kind/feature Categorizes issue or PR as related to a new feature. label Aug 29, 2023
@k8s-ci-robot k8s-ci-robot added the needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label Aug 29, 2023
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Aug 29, 2023
@zhuqi-lucas
Copy link
Author

/kind feature
/sig scheduling

@k8s-ci-robot k8s-ci-robot added sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Aug 29, 2023
@AxeZhan
Copy link
Member

AxeZhan commented Aug 30, 2023

See #114297 and #110175 . We have skip in QueueingHint, I think we can replace PreEnqueue after all plugins implement the QueueingHint

@kerthcet
Copy link
Member

So generally Skip works for a pair of extension points, like we get Skip in PreFilter, then we'll skip Filter stage. On your case, I think you don't need skip at all because if you PreEnqueue plugin returns status other than Success, you pod will be blocked into the activeQ already.

@zhuqi-lucas
Copy link
Author

Thank you @AxeZhan @kerthcet for reply, i am wandering to add skip for this when using scheduling framework to extend the preEnqueue, in some case, we don't need to back into the preFilter and following steps, we want to skip all steps when we skip the preEnqueue.

submit a PR above

@kerthcet
Copy link
Member

kerthcet commented Sep 6, 2023

If you pod is blocked by preEnqueue, the pod will not enter into the activeQ, then blocking in the scheduling cycle. Isn't this as you expected?

@zhuqi-lucas
Copy link
Author

@kerthcet No i want to skip it, don't add it to activeQ, when we skip from preEnqueue.

@kerthcet
Copy link
Member

I mean right now if your pod is rejected by the PreEnqueue, it will not enter into activeQ, but pending in unschedulablePods.

@zhuqi-lucas
Copy link
Author

@kerthcet If we also can skip unschedulablePods for this case, i am not sure if i make sense right, unschedulablePods will come back to active queue to schedule, we want to skip it totally.

@kerthcet
Copy link
Member

If the pod failed the PreEnqueue, it will never enter into activeQ, see https://kubernetes.io/blog/2022/12/26/pod-scheduling-readiness-alpha/ for more details please.

@github-project-automation github-project-automation bot moved this to Needs Triage in SIG Scheduling Sep 22, 2023
@github-project-automation github-project-automation bot moved this to Needs Triage in SIG Apps Sep 29, 2023
@helayoty helayoty removed this from SIG Apps Sep 29, 2023
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 28, 2024
@kerthcet
Copy link
Member

Seems we can close this from the previous discussion, any other concerns @zhuqi-lucas

@zhuqi-lucas
Copy link
Author

We can close it @kerthcet , thank you!

@github-project-automation github-project-automation bot moved this from Needs Triage to Closed in SIG Scheduling Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling.
Projects
Archived in project
Development

No branches or pull requests

5 participants