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
Optimization on running prePreEnqueuePlugins before adding pods into activeQ #115583
Conversation
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The 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. |
/sig scheduling |
@Huang-Wei PTAL, the reason I introduced a |
There is no need :) just call |
21572ba
to
2713777
Compare
2713777
to
1eb0818
Compare
@lianghao208 ^^ in case you didn't see this comment |
working on it, thanks for the reminder. |
1eb0818
to
7d0acb0
Compare
@Huang-Wei already added a test to cover, PTAL |
7d0acb0
to
eef7aa4
Compare
eef7aa4
to
28a1a67
Compare
@Huang-Wei already addressed the comments accordingly:) |
28a1a67
to
c01fa82
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
/lgtm
Thanks @lianghao208 !
LGTM label has been added. Git tree hash: d2fdf47034d663ec655b2f7b1f5bc125e8115488
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Huang-Wei, lianghao208 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Sorry if I may miss something. But, I have doubts related to this change. The PR description said "pods called in flushBackoffQCompleted() should have already passed all PreEnqueue plugins", is it really correct? The |
This is true only for the schedulinggate plugin. We say people mustn't change gated -> non-gated via schedulingGate field. But we don't say the PreEnqueue plugin cannot change the decision to a Pod once it returned success to a Pod. So, in general, this change is a huge breaking change for other custom PreEnqueue plugin since the PreEnqueue is no longer the place where the Pods go through before ActiveQ |
cc @kubernetes/sig-scheduling-leads I even think we should revert this. Also, this will make this proposal impossible. |
@sanposhiho If a Pod is in backoffQ, it must have passed through activeQ, which means it have already passed all PreEnqueue plugins.(Only if those pod passed all PreEnqueue plugins can they be insert into activeQ) Does it make sense to you? PS: backoffQ.Add() has been called in following places: In these senario, pod may not been bound successfully (unschedulable) and need to add it back to scheduling queue.(already passed activeQ before) |
No. You are correct if only talking about the schedulinggate. |
I agree that this should be reverted. The case for preEnqueue is not limited to schedulingGates. |
@ahg-g can we include the change for reverting this in v1.27? (I mean is it allowed under the code freeze policy? |
I think we should revert this too. It's a big win to ensure out-of-tree PreEnqueue plugins (or even in the future in-tree plugins as well) to be called when Pods are about to be enqueued. @lianghao208 apologize for the confusion for initializing this PR idea and assign to you. |
I asked if it's too late to revert the change, in sig-release channel. If it's too late, we can wait for the first 1.27 patch release. |
I'll send the reverting PR soon. |
What type of PR is this?
/kind feature
/sig scheduling
What this PR does / why we need it:
discussion: #113275 (comment)
pods called in flushBackoffQCompleted() should have already passed all PreEnqueue plugins, and given its state is one-way transitional, we don't need to go through PreEnqueue plugins again.
add a flag to call/skip PreEnqueue plugins.
Which issue(s) this PR fixes:
Part of #113608
Special notes for your reviewer:
cc @Huang-Wei
Does this PR introduce a user-facing change?