-
Notifications
You must be signed in to change notification settings - Fork 40k
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
WIP Honor pod priorities when starting pods #125918
base: master
Are you sure you want to change the base?
WIP Honor pod priorities when starting pods #125918
Conversation
Welcome @huutomerkki! |
Hi @huutomerkki. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
/ok-to-test thanks for your PR. The two obvious questions are: how can we make sure this change doesn't break existing flows (e.g. do we have sufficient test coverage?) ? since this change is admittedly partially addressing a problem, how can we assess the gains? |
/triage accepted |
Thanks for checking it out and sorry for the delay in answering. For the first question, for a flow to be affected, it has to use the order in which Kubelet tries to start the pods for something and make assumptions based on it. This order is not promised to be the actual starting order of pods, so I would assume there is rather limited amount of valid use cases for this. If there is some obvious one I'm missing, I'd be more than happy to write tests to cover it, same goes for editing the test cases that exist to cover this change if viewed necessary. For assessing the gains of this change; I'll try to get my hands on some data that I can share. Without it it's hard to assess the gains, but I'd like to point out that this change is aimed for larger and heavier applications, and there most likely is not any noticeable benefit in applications consisting of just a handful of pods. This change assures that the order in which pods are tried to start is always optimal, which might not be too visible in action. If nothing else, it should make the restart process and times more uniform and predictable. |
@ffromani do you have any other concerns on this patch ? |
af2c966
to
8d35728
Compare
/retest |
Hey! do we have updates about the gains this PR brings? While I'm generally in favor of this PR, it admittedly partially addresses a problem touching a critical and not-strongly-tested kubelet flow, so having solid gains will be a big plus towards the merge. Other than that, I think we should consider adding e2e coverage. We can start with minimal non-regression coverage, i for myself would call that sufficient. |
In overall idea looks ok, but generic question: for 2 pods with same priority, should it be still sorted by creation time? |
I want to make sure to reflect one point we discussed at SIG Node today. With this change, if kubelet restart happens at precise moment when a new Pod is scheduled, we will have a big change in behavior - instead of eviction message we will get a pod admission failure. This change of behavior will be confusing. To mitigate this risk, can you please write down all conditions need to be met for this to happen. Is it probable? Is it likely to happen in specific circumstances (e.g. in a deployment one pod is restarting kubelet to apply a new config and it results in a more critical pod scheduled). Maybe the right fix is to change ordering for all pods that were running before and keep the new ones to the end. Maybe some other solution like this will help. |
8d35728
to
b1fc578
Compare
Signed-off-by: Minna Färm <minna.farm@est.tech>
…eature Signed-off-by: Minna Färm <minna.farm@est.tech>
b1fc578
to
9adc6e3
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: huutomerkki The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Adding the work I've done so far here as I changing org. Had some issues with rebasing so there's some accidental labels on here, feel free to remove if you know how. Current status of the e2e test is that the pods are not being restarted, would love to have another set of eyes to tell me why?
I see no reason to use other method to determine that, as 2 pods with same priorities should be interchangeable in starting order.
Can you elaborate on this? I don't understand why the behaviour would change. |
@huutomerkki: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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 understand the commands that are listed here. |
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.
/remove-sig cluster-lifecycle
/remove-area kubeadm
What type of PR is this?
/kind bug
What this PR does / why we need it:
This PR changes the order of starting pods to honor the pod priorities, higher priority pods being started first. If no priorities are used, the order is based on pod creation timestamps, oldest pods being started first.
Which issue(s) this PR fixes:
Fixes #125815
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: