Skip to content

fix:cri: Stable order for StatusResponse.RuntimeHandlers#12036

Merged
AkihiroSuda merged 3 commits intocontainerd:mainfrom
DataDog:eric.mountain/stable-rh-order
Jul 2, 2025
Merged

fix:cri: Stable order for StatusResponse.RuntimeHandlers#12036
AkihiroSuda merged 3 commits intocontainerd:mainfrom
DataDog:eric.mountain/stable-rh-order

Conversation

@EricMountain
Copy link
Copy Markdown
Contributor

The RuntimeHandlers list in the response to the CRI Status() method (crictl info) has unstable ordering
since commit 97eb1cd (underlying switch from list to map) that was shipped in v2.1.0.

On Kubernetes nodes this causes the kubelet to update node status subresources
every time the order of runtime handlers changes in the status response from
containerd. The likelihood increases with the number of runtime handlers present
on nodes. In some clusters this leads to every single node sending a status update
every few seconds, leading in turn to excessive Kube API server load.

This change enforces stable ordering on runtime handler names to restore the original behaviour.

@k8s-ci-robot
Copy link
Copy Markdown

Hi @EricMountain. Thanks for your PR.

I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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.

@dosubot dosubot bot added area/cri Container Runtime Interface (CRI) kind/bug labels Jun 30, 2025
@EricMountain EricMountain force-pushed the eric.mountain/stable-rh-order branch 3 times, most recently from dbdbdfa to 2cc6656 Compare June 30, 2025 13:40
Signed-off-by: Eric Mountain <eric.mountain@datadoghq.com>
The runtimeHandlers list in the response to `crictl info` has unstable ordering
since commit 97eb1cd (underlying switch from list to map) that was shipped in
v2.1.0.

On Kubernetes nodes this causes the kubelet to update node status subresources
every time the order of runtime handlers changes in the status response from
containerd. The lieklihood increases with the number of runtime handlers present
on nodes. In some clusters this leads to every single node sending a status update
every few seconds leading to excessive Kube API server load.

This change enforces stable ordering on runtime handler names.

Signed-off-by: Eric Mountain <eric.mountain@datadoghq.com>
Signed-off-by: Eric Mountain <eric.mountain@datadoghq.com>
@EricMountain EricMountain force-pushed the eric.mountain/stable-rh-order branch from 2cc6656 to eb63b5b Compare July 1, 2025 07:58
@AkihiroSuda AkihiroSuda added the cherry-pick/2.1.x Change to be cherry picked to release/2.1 branch label Jul 1, 2025
@AkihiroSuda
Copy link
Copy Markdown
Member

/ok-to-test

@github-project-automation github-project-automation bot moved this from Needs Triage to Review In Progress in Pull Request Review Jul 1, 2025
@AkihiroSuda AkihiroSuda added this pull request to the merge queue Jul 2, 2025
Merged via the queue into containerd:main with commit 0107c53 Jul 2, 2025
53 checks passed
@github-project-automation github-project-automation bot moved this from Review In Progress to Done in Pull Request Review Jul 2, 2025
@AkihiroSuda
Copy link
Copy Markdown
Member

/cherry-pick release/2.1

@k8s-infra-cherrypick-robot
Copy link
Copy Markdown

@AkihiroSuda: new pull request created: #12054

Details

In response to this:

/cherry-pick release/2.1

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.

@austinvazquez austinvazquez added cherry-picked/2.1.x PR commits are cherry picked into the release/2.1 branch and removed cherry-pick/2.1.x Change to be cherry picked to release/2.1 branch labels Jul 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/cri Container Runtime Interface (CRI) cherry-picked/2.1.x PR commits are cherry picked into the release/2.1 branch kind/bug ok-to-test size/L

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

6 participants