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
CPU usage of pod always zero #17889
Comments
You can compare with the output of EDIT: There is also a dedicated |
I think it is related to There is a hardcoded kubelet workaround for cri-o, but I think it is only implemented for containerd. // UsingLegacyCadvisorStats returns true if container stats are provided by cadvisor instead of through the CRI.
// CRI integrations should get container metrics via CRI.
// TODO: cri-o relies on cadvisor as a temporary workaround. The code should
// be removed. Related issue:
// https://github.com/kubernetes/kubernetes/issues/51798
func UsingLegacyCadvisorStats(runtimeEndpoint string) bool {
return strings.HasSuffix(runtimeEndpoint, CrioSocketSuffix)
} |
Thanks for the answer @afbjorklund , really appreciated! |
I think the function was wrongly implemented, so the fallback doesn't work either. So it is probably a bug. func (*UnimplementedRuntimeServiceServer) ListPodSandboxStats(ctx context.Context, req *ListPodSandboxStatsRequest) (*ListPodSandboxStatsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListPodSandboxStats not implemented")
} func (ds *dockerService) ListPodSandboxStats(context.Context, *runtimeapi.ListPodSandboxStatsRequest) (*runtimeapi.ListPodSandboxStatsResponse, error) {
return nil, fmt.Errorf("ListPodSandboxStats is not implemented")
} If it (cri-dockerd) is indeed the issue here, there should be some evidence about the error in the kubelet logs. |
wow... @afbjorklund I didn't expect that. Is there a way (or more than one) to collect some info on the cluster and its components? |
Can't duplicate it here, though. (v1.32.0) top node
top pods -A
It uses cri-dockerd 0.3.3, will try 0.3.9 too |
This is the command I'm executing:
And this is the complete output I get:
So it seems to work for me either, what I want to say is that when the |
I think it is a known issue with cri-dockerd, there might be some workarounds available but anyway. The dockershim code was removed from Kubernetes, before the new functionality was in cri-dockerd https://kubernetes.io/docs/tasks/administer-cluster/migrating-from-dockershim/
|
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
What Happened?
Context: #13898
I've been using the flag
--disable-optimizations
, but that doesn't solve the problem for me.I need to get some statistics about the utilization and requests of some pods, but I can't get that since the output tells me always zero, even under stress tests:
Attach the log file
log.txt
Operating System
Ubuntu
Driver
Docker
The text was updated successfully, but these errors were encountered: