Skip to content

ctr/tasks: fix unmarshal the task metrics for cgroup v1#8302

Merged
fuweid merged 1 commit intocontainerd:mainfrom
Iceber:fix_ctr_task_metrics
Mar 24, 2023
Merged

ctr/tasks: fix unmarshal the task metrics for cgroup v1#8302
fuweid merged 1 commit intocontainerd:mainfrom
Iceber:fix_ctr_task_metrics

Conversation

@Iceber
Copy link
Copy Markdown
Member

@Iceber Iceber commented Mar 23, 2023

Fix #8301 with a relatively minor change, since there is no way to predict when hcsshim's cgroup dependencie will be upgraded to v3.

Ensure that ctr task metrics are available on a system with cgroupv1 before hcshim's cgroup is upgraded to v3.

fix: #8301

Match the type by the type url of the metric data.

This approach seems more reasonable and stable than the previous temporary solution(https://github.com/containerd/containerd/issues/8301#issuecomment-1480556963),and does not care about hcsshim's dependencies

related pr: #8234

@k8s-ci-robot
Copy link
Copy Markdown

Hi @Iceber. 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.

@Iceber Iceber force-pushed the fix_ctr_task_metrics branch 3 times, most recently from a2fb8a2 to e29f76a Compare March 23, 2023 06:41
@Iceber Iceber force-pushed the fix_ctr_task_metrics branch from e29f76a to 1be08b1 Compare March 23, 2023 06:42
Copy link
Copy Markdown
Member

@fuweid fuweid left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks

@fuweid fuweid added the cherry-pick/1.7.x Change to be cherry picked to release/1.7 branch label Mar 24, 2023
@fuweid fuweid merged commit f7f2be7 into containerd:main Mar 24, 2023
@fuweid fuweid added cherry-picked/1.7.x PR commits are cherry-picked into release/1.7 branch and removed cherry-pick/1.7.x Change to be cherry picked to release/1.7 branch labels Mar 31, 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 needs-ok-to-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

4 participants