-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
Kubelet may reject static pods when the node is out of disk space, and will not retry them #35521
Comments
@justinsb pod phases progress monotonically. Once a pod has been rejected and transition to the "Failed" state, it is not supposed to go back to pending or running. I don't think kubelet should retry them |
But - for example - we check disk space in canAdmitPod. That is a temporary condition. How do you propose to handle this instead? |
kubelet doesn't care about whether the condition is temporary or not (for regular pods). It assumes the control plane (e.g., ReplicaSet) can react and determine what to do. |
/cc @kubernetes/sig-node |
Hmmm.. that is tricky because of static pod manifests. I put the network-readiness check in the same place as the disk space check, as I figured that was the closest analog. Looking for a place to move it such that the pod can be admitted, but where we can prevent it actually starting:
|
How about in |
@justinsb hmm....even for regular pods, this behavior seems undesirable. If kubelet restarts, and the network plugin is not ready (due to podCIDIR) yet, it would reject all pods assigned to it. That seems to be what caused the serial suite to fail.
It might work. That just means kubelet will not sync the pod if network is not ready. I don't think disk space should be moved to the same space because kubelet actually wants to reject them. Can we revert your original PR first? Thanks. |
I feel like I've seen bad behaviour with full disks, so it feels like this is actually exposing a pre-existing problem. I don't understand why we would permanently reject a static pod if the disk was full? It feels like we should move both to syncPod... I have a WIP PR which I'm testing now - can we give me a few minutes to see if that just fixes things, and then if not we can revert? |
Actually, on second thoughts, if we're blocking the submit queue we can just revert. It sounds like this is a non-trivial issue, so it's worth finding the right solution. |
I don't think it's blocking the submit queue. Since you no longer need to change the admission logic, there are parts in your original PR that's not needed anymore. I think reverting makes sense here, and will make cherrypicking easier too. |
This is a bug, and it should be fixed. I changed the title to reflect that (thanks). The immediate solution if anyone encounters such a situation is to restart kubelet to let the pods go through the admission process again. @justinsb I don't think your new PR needs to change the admission logic at all, so it shouldn't be affected by this bug. |
Related PR: #35342 Conditions which the scheduler is not aware of, or that should be retried on the same node should be "soft rejected", i.e. the pod should not be marked as failed, instead it should be blocked from starting. |
Related to: #22212 |
Issues go stale after 30d of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or |
/kind bug |
/assign |
/unassign I don't want to make another exception for static pods... /priority backlog |
/milestone clear |
/triage needs-information need repro on the latest versions of confirmation from somebody experiencing it |
Please reopen if you experience this issue. |
@matthyx: Closing this issue. In response to this:
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. |
If a pod fails admission (admission controller, disk space, or network not ready as of #33347), it is not retried.
I think this is the cause of #35409
Working up a PR now... I am thinking of keeping a list of pods that were rejected, and reattempting them every housekeeping interval.
The text was updated successfully, but these errors were encountered: