-
Notifications
You must be signed in to change notification settings - Fork 40.9k
Fix:Static pod status is always Init:0/1 if unable to get init container status #131317
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
base: master
Are you sure you want to change the base?
Conversation
Please note that we're already in Test Freeze for the Fast forwards are scheduled to happen every 6 hours, whereas the most recent run was: Tue Apr 15 13:35:16 UTC 2025. |
Hi @bitoku. 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. |
Do we have a reliable way to reproduce this issue and present the reproduction process in an e2e test case? Since this is a bug fix, we need to ensure that we’ve fixed it and that future changes won’t break this fix. |
We have a reliable way to reproduce the issue.
But it needs kubelet restart and direct container manipulation. Do we have the existing tests that do those operations? |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: bitoku 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 |
/ok-to-test |
/test? |
@HirazawaUi: The following commands are available to trigger required jobs:
The following commands are available to trigger optional jobs:
Use
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-sigs/prow repository. |
/test pull-kubernetes-node-kubelet-serial-containerd |
/triage accepted @bitoku please, fix CI failures, thanks! |
/retest |
1 similar comment
/retest |
All tests are green. Can you PTAL? |
/assign @haircommander |
pkg/kubelet/kubelet_pods.go
Outdated
if s == nil && kuberuntime.HasAnyRegularContainerCreated(pod, podStatus) && statuses[container.Name].State.Waiting != nil { | ||
statuses[container.Name].State = v1.ContainerState{ | ||
Terminated: &v1.ContainerStateTerminated{ | ||
Reason: "Completed", | ||
Message: "Unable to get init container status from container runtime and pod has been initialized, treat it as exited normally", | ||
ExitCode: 0, | ||
}, | ||
} | ||
continue | ||
} |
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.
Should this be done only for static pods just to be on the safe side?
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.
done!
/retest |
/test pull-kubernetes-node-crio-cgrpv2-e2e-canary |
1 similar comment
/test pull-kubernetes-node-crio-cgrpv2-e2e-canary |
/test pull-kubernetes-node-crio-cgrpv2-e2e |
…ner status from container runtime. Signed-off-by: Ayato Tokubi <[email protected]>
/test pull-kubernetes-node-crio-cgrpv2-e2e-canary |
/retest |
/test pull-kubernetes-node-kubelet-serial-containerd |
Hi! I addressed the comments. PTAL. |
/test pull-kubernetes-node-crio-cgrpv2-e2e-canary |
@bitoku: 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. |
What type of PR is this?
/kind bug
What this PR does / why we need it:
This PR is recreation of old PR #122897 and #108583
Which issue(s) this PR fixes:
Fixes #108537
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: