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
Automated cherry pick of #108366 (release-1.23): Delay writing a terminal phase until the pod is terminated #108723
Conversation
Doing a early cherrypick of #108366 on release-1.23 so we can get CI signal on release branch. |
/retest was the cherry-pick onto 1.23 clean? |
Other components must know when the Kubelet has released critical resources for terminal pods. Do not set the phase in the apiserver to terminal until all containers are stopped and cannot restart. As a consequence of this change, the Kubelet must explicitly transition a terminal pod to the terminating state in the pod worker which is handled by returning a new isTerminal boolean from syncPod. Finally, if a pod with init containers hasn't been initialized yet, don't default container statuses or not yet attempted init containers to the unknown failure state.
Exploring termination revealed we have race conditions in certain parts of pod initialization and termination. To better catch these issues refactor the existing test so it can be reused, and then test a number of alternate scenarios.
Create an E2E test that creates a job that spawns a pod that should succeed. The job reserves a fixed amount of CPU and has a large number of completions and parallelism. Use to repro github.com/kubernetes/issues/106884 Signed-off-by: David Porter <david@porter.me>
Signed-off-by: David Porter <david@porter.me>
fb1c768
to
7f02733
Compare
/lgtm |
Removing WIP since master PR has merged. |
/hold cancel multiple green runs of post-submit serial test jobs on master with this fix |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bobbypage, liggitt, saschagrunert 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 |
/test pull-kubernetes-dependencies |
Cherry pick of #108366 on release-1.23.
For details on the cherry pick process, see the cherry pick requests page.