-
Notifications
You must be signed in to change notification settings - Fork 39k
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
CRI: Clearly define the expectation of Summary API and CRI Stats #53514
Comments
To be precise, we only exclude the duplicated terminated container in the cadvisor case. kubernetes/pkg/kubelet/stats/cadvisor_stats_provider.go Lines 198 to 199 in 2eadc73
|
@yguo0905 If it only excludes the duplicated terminated container, I feel like this logic should be in kubelet instead of container runtime. Container runtime should just return stats for all containers. |
Yeah, this logic was added only for fixing the issue #47853, where cadvisor reported metrics of uncleaned container cgroups. |
I think providing stats for all containers are good. kubelet can filter them out if necessary. cadvisor simply doesn't support that since it only tracks cgroups (for running containers).
Excluding duplicated terminated containers is just a workaround for bugs in the existing integration. It was hard to fix for cadvisor+docker because the concept of container in the two components are different. |
@yujuhong Thanks. Then based on the above discussion I'll close containerd/cri#330 and update kubelet instead. :) Thanks! |
What do you mean "duplicated"? Say we have a container which has been restarted once. |
…-stats Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Filter out duplicated container stats **What this PR does / why we need it**: **Which issue this PR fixes** * fixes #53514 **Special notes for your reviewer**: /cc @Random-Liu Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
In Kubernetes 1.8, we added the support to let kubelet get container stats from CRI.
However, it's not clearly defined whether stats should be returned for non-running container.
Today's situation:
and our summary api node e2e test makes the same assumption https://github.com/kubernetes/kubernetes/blob/master/test/e2e_node/summary_test.go#L51;
We should:
For now, I'll just skip stats with zero memory or cpu usage in cri-containerd.
@timstclair @yujuhong @yguo0905 @dashpole @feiskyer
/cc @kubernetes/sig-node-api-reviews
The text was updated successfully, but these errors were encountered: