Bug 1782112 - `crictl stats` doesn't show anything
Summary: `crictl stats` doesn't show anything
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Node
Version: 4.1.z
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
: 4.4.0
Assignee: Ryan Phillips
QA Contact: Sunil Choudhary
URL:
Whiteboard:
Depends On:
Blocks: 1782999 1784067
TreeView+ depends on / blocked
 
Reported: 2019-12-11 08:02 UTC by Shivkumar Ople
Modified: 2023-03-24 16:23 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1782999 1784067 (view as bug list)
Environment:
Last Closed: 2019-12-16 15:56:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1666358 0 unspecified CLOSED `crictl stats` doesn't show anything 2023-09-18 00:15:15 UTC

Description Shivkumar Ople 2019-12-11 08:02:48 UTC
Description of problem:

Update to Openshift 4.1.23, the command 'crictl stats' does not return any result.
Before the update (from version 4.1.11) the command was working fine and allow us to check stats on our containers


SSH'd to a node.  Ran `crictl stats`. Expected to see a list of container stats for the running containers. Got an empty list.  Passed `--pod ID`. Got nothing.


Version-Release number of selected component (if applicable):

OpenShift 4.1.23

=========== List of installed package and versions ===========
# rpm -qa | grep -E "cri-o|runc"
runc-1.0.0-61.rc8.rhaos4.1.git3cbe540.el8.x86_64
cri-o-1.13.11-0.14.dev.rhaos4.1.git3338d4d.el8.x86_64
# crictl version
Version:  0.1.0
RuntimeName:  cri-o
RuntimeVersion:  1.13.11-0.14.dev.rhaos4.1.git3338d4d.el8-dev
RuntimeApiVersion:  v1alpha1

How reproducible:

Always

=========== worker-1 as core  - Missing Container stats ===========
[core@worker-1 ~]$ sudo crictl ps | grep oxidized
c0ade5a9f056f       registry/oxidized/oxidized@sha256:192525b02cd34c94f6c25a461b205c14c14668072edf7a255bafcdacff6772dc             7 hours ago         Running             cron-oxidized           0                   f527981ff3bfc
[core@worker-1 ~]$ sudo crictl stats --id c0ade5a9f056f
CONTAINER           CPU %               MEM                 DISK                INODES
[core@worker-1 ~]$ sudo crictl -D stats --id c0ade5a9f056f
DEBU[0000] ListContainerStatsRequest: &ListContainerStatsRequest{Filter:&ContainerStatsFilter{Id:c0ade5a9f056f,PodSandboxId:,LabelSelector:map[string]string{},},}
DEBU[0000] ListContainerResponse: &ListContainerStatsResponse{Stats:[],}
DEBU[0001] ListContainerStatsRequest: &ListContainerStatsRequest{Filter:&ContainerStatsFilter{Id:c0ade5a9f056f,PodSandboxId:,LabelSelector:map[string]string{},},}
DEBU[0001] ListContainerResponse: &ListContainerStatsResponse{Stats:[],}
CONTAINER           CPU %               MEM                 DISK                INODES

=========== master-0 as core  - Missing containers stats ===========
[core@master-0 ~]$ sudo crictl stats -a
CONTAINER           CPU %               MEM                 DISK                INODES
[core@master-0 ~]$ sudo crictl -D stats -a
DEBU[0000] ListContainerStatsRequest: &ListContainerStatsRequest{Filter:&ContainerStatsFilter{Id:,PodSandboxId:,LabelSelector:map[string]string{},},}
DEBU[0000] ListContainerResponse: &ListContainerStatsResponse{Stats:[],}
DEBU[0001] ListContainerStatsRequest: &ListContainerStatsRequest{Filter:&ContainerStatsFilter{Id:,PodSandboxId:,LabelSelector:map[string]string{},},}
DEBU[0001] ListContainerResponse: &ListContainerStatsResponse{Stats:[],}
CONTAINER           CPU %               MEM                 DISK                INODES



Actual results:
Stats are empty

Expected results:
Stats should get printed

Additional info:

Similar Bugzilla closed but not working in the above case.: https://bugzilla.redhat.com/show_bug.cgi?id=1666358


Note You need to log in before you can comment on or make changes to this bug.