Skip to content

cri: Fix umarshal metrics#8473

Merged
samuelkarp merged 1 commit intocontainerd:mainfrom
brandond:fix-cri-stats_main
May 4, 2023
Merged

cri: Fix umarshal metrics#8473
samuelkarp merged 1 commit intocontainerd:mainfrom
brandond:fix-cri-stats_main

Conversation

@brandond
Copy link
Copy Markdown
Contributor

@brandond brandond commented May 3, 2023

This is essentially the same change as #8302, but for the CRI server.

Without this fix, the kubelet fails to collects stats with:

time="2023-05-03T00:47:28.890947681Z" level=error msg="ListContainerStats failed" error="failed to convert to cri containerd stats format: failed to decode container metrics for \"6fb75f811841004943a338064d05f643b797afac8c09786551a0d5c0865c20b7\": failed to obtain cpu stats: unexpected metrics type: &Metrics{Pids:&PidsStat{Current:13,Limit:18446744073709551615,XXX_unrecognized:[],},CPU:&CPUStat{UsageUsec:1224890,UserUsec:1179817,SystemUsec:45073,NrPeriods:0,NrThrottled:0,ThrottledUsec:0,XXX_unrecognized:[],},Memory:&MemoryStat{Anon:12480512,File:8192,KernelStack:212992,Slab:260032,Sock:12288,Shmem:0,FileMapped:0,FileDirty:8192,FileWriteback:0,AnonThp:0,InactiveAnon:12476416,ActiveAnon:4096,InactiveFile:0,ActiveFile:8192,Unevictable:0,SlabReclaimable:92992,SlabUnreclaimable:167040,Pgfault:5710,Pgmajfault:0,WorkingsetRefault:0,WorkingsetActivate:0,WorkingsetNodereclaim:0,Pgrefill:0,Pgscan:0,Pgsteal:0,Pgactivate:2,Pgdeactivate:0,Pglazyfree:1,Pglazyfreed:0,ThpFaultAlloc:0,ThpCollapseAlloc:0,Usage:13189120,UsageLimit:18446744073709551615,SwapUsage:0,SwapLimit:18446744073709551615,XXX_unrecognized:[],},Rdma:&RdmaStat{Current:[]*RdmaEntry{},Limit:[]*RdmaEntry{},XXX_unrecognized:[],},Io:&IOStat{Usage:[]*IOEntry{},XXX_unrecognized:[],},Hugetlb:[]*HugeTlbStat{&HugeTlbStat{Current:0,Max:18446744073709551615,Pagesize:2MB,XXX_unrecognized:[],},&HugeTlbStat{Current:0,Max:18446744073709551615,Pagesize:1GB,XXX_unrecognized:[],},},MemoryEvents:&MemoryEvents{Low:0,High:0,Max:0,Oom:0,OomKill:0,XXX_unrecognized:[],},XXX_unrecognized:[],}"

@k8s-ci-robot
Copy link
Copy Markdown

Hi @brandond. 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/test-infra repository.

Copy link
Copy Markdown
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thx

@mikebrow
Copy link
Copy Markdown
Member

mikebrow commented May 3, 2023

/ok-to-test

@samuelkarp samuelkarp merged commit f5b10fd into containerd:main May 4, 2023
@fuweid fuweid added the cherry-picked/1.7.x PR commits are cherry-picked into release/1.7 branch label May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-picked/1.7.x PR commits are cherry-picked into release/1.7 branch ok-to-test

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

8 participants