-
Notifications
You must be signed in to change notification settings - Fork 40.1k
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
fix: discard a pod at Pop() when the pod is being scheduled #127016
fix: discard a pod at Pop() when the pod is being scheduled #127016
Conversation
Skipping CI for Draft Pull Request. |
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-sigs/prow repository. |
I'll have a test for it. Just open it right now to show it to @KunWuLuan and other people. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sanposhiho 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 |
/hold To make sure this PR goes thru the approver's approval |
9c570de
to
9b40008
Compare
fc98923
to
62ead30
Compare
/retitle fix: discard a pod at Pop() when the pod is being scheduled |
62ead30
to
6a230c8
Compare
/lgtm |
LGTM label has been added. Git tree hash: 9d08ff05cbfad5821d57f018a4baf702b5c5211b
|
6a230c8
to
6d357d2
Compare
@alculquicondor addressed |
/lgtm |
LGTM label has been added. Git tree hash: b0306242b81ca3d89cc162c13c228b07d935c623
|
/unhold |
What type of PR is this?
/kind bug
What this PR does / why we need it:
inFlightPods should have only one element per Pod.
But, the scheduler had a bug which multiple Pod objects in different places mistakenly. (binding cycle and the queue) #118226
This kind of bug would result in a serious memory leak because
Done()
wouldn't be able to clean up Pods in InFlightEvents correctly.So, in this PR, we discard the Pod if it's being scheduled (which shouldn't happen unless we make the same bug like #118226 though)
so that a possible duplicated Pod issue in the future wouldn't cause a huge memory leak issue, at least.
Which issue(s) this PR fixes:
Part of #120622
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: