-
Notifications
You must be signed in to change notification settings - Fork 40.7k
Fix evented pleg to adapt to containerd2.0 #129990
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
/test pull-kubernetes-node-crio-cgrpv1-evented-pleg-e2e |
/test pull-kubernetes-node-crio-cgrpv1-evented-pleg-e2e |
1d7bee8
to
3740c76
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: HirazawaUi 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 |
The test failure is unrelated to the current PR. Even without any changes, the test job still fails consistently. I’ve opened an issue to track this problem. |
Do we have any containerd job that runs node e2e using evented pleg? |
/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. |
We currently don't have a node e2e job running on containerd, but the |
kubernetes/test-infra#34063 is tracking CI for containerd 2.0. |
/retest |
The test failures is a known issue that's consistently observed across all evented pleg related PRs. merge #129355 will address this problem. |
/triage accepted |
/lgtm /assign @SergeyKanzhelev @mrunalp |
LGTM label has been added. Git tree hash: caec646b9fad29dcf4610ced215c53dd120f74ec
|
/retest |
/test pull-kubernetes-node-crio-cgrpv1-evented-pleg-e2e-kubetest2 |
@HirazawaUi: 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. |
@bart0sh These tests will not pass unless we merge #129355. To facilitate the review of #129355, I have cherry-picked the changes from this PR into #129355. Due to some issues from containerd, these two PRs have become interdependent. Unless we merge one of them first, the other will not pass the tests. |
IMHO you should put all commits into a PR, so we can see them pass? |
Thank you for the reminder. I have already merged the content of the current PR into #129355. However, to maintain the singularity of the fixes, I have kept both PRs separate. If this PR can be merged quickly, I will rebase the other PR accordingly. |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
What type of PR is this?
/kind bug
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #129818 #129857
Special notes for your reviewer:
This PR aims to fix the issue where the evented pleg feature fails to work after upgrading containerd to version 2.0.
Currently, in evented pleg, we determine whether to retrieve container statuses from
PodSandboxStatusResponse.containerStatuses
by checking if thePodSandboxStatusResponse.Timestamp
field is empty.ref:
kubernetes/pkg/kubelet/kuberuntime/kuberuntime_manager.go
Lines 1634 to 1656 in 7140b49
However, containerd introduced a change in version 2.0 where it populates the
PodSandboxStatusResponse.Timestamp
field but leavesPodSandboxStatusResponse.containerStatuses
unset. This causes evented pleg to fail to correctly fetch container statuses when enabled.ref: containerd/containerd#10740
This PR proposes a fix by checking both the
PodSandboxStatusResponse.Timestamp
andPodSandboxStatusResponse.containerStatuses
fields.The original KEP(https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/3386-kubelet-evented-pleg/README.md#runtime-service-changes) mentions that the
PodSandboxStatusRequest
should include anincludeContainers
field to determine whether to return timestamp and containerStatuses in the response. However, this field has not been added to the CRI protobuf definitions.If we decide to update the CRI protobuf definitions or annotations (e.g., adding includeContainers) and align containerd’s implementation accordingly, this PR will no longer be necessary and can be closed.
If no changes to the CRI proto are planned, we should proceed with merging this PR to resolve the immediate issue.
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: