Skip to content

ctr v1.7.0 fails to execute "task metric" (ctr: cannot convert metric data to cgroups.Metrics or windows.Statistics) #8301

@szberko

Description

@szberko

Description

Using ctr-v1.7.0 and executing tasks metric on a Kubernetes cluster with cgroupv1 produces the following error:

ctr: cannot convert metric data to cgroups.Metrics or windows.Statistics

The same setup with cgroupv2 works well.

Steps to reproduce:

ctr -version
ctr github.com/containerd/containerd v1.7.0
ctr --address "/run/containerd/containerd.sock" --namespace k8s.io tasks metric 2b1943ffd02337583d87c7c71891486db59642264bc063fe1706cd42b31fefad --format json

ctr: cannot convert metric data to cgroups.Metrics or windows.Statistics

Steps to reproduce the issue

  1. Execute the following with ctr-v1.7.0 on a system with cgroupv1:
ctr --address "/run/containerd/containerd.sock" --namespace k8s.io tasks metric 2b1943ffd02337583d87c7c71891486db59642264bc063fe1706cd42b31fefad --format json
  1. Result:
ctr: cannot convert metric data to cgroups.Metrics or windows.Statistics

Describe the results you received and expected

Results received:

ctr: cannot convert metric data to cgroups.Metrics or windows.Statistics

Expected results:

  • JSON file with all the metrics.

What version of containerd are you using?

1.7.0

Any other relevant information

No response

Show configuration if it is related to CRI plugin.

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions