Skip to content
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

support network metrics for cgroupv2 #361

Merged
merged 1 commit into from
Mar 25, 2025
Merged

Conversation

zouyee
Copy link
Contributor

@zouyee zouyee commented Mar 19, 2025

xref: #81

Signed-off-by: zouyee <zouyee1989@gmail.com>
Copy link
Member

@akhilerm akhilerm left a comment

Choose a reason for hiding this comment

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

I am thinking if I can use this in containerd/containerd#10691 for getting the network metrics rather than via https://github.com/vishvananda/netlink that the CRI-O implementation uses for network metrics

cc: @mikebrow

@zouyee
Copy link
Contributor Author

zouyee commented Mar 21, 2025

I am thinking if I can use this in containerd/containerd#10691 for getting the network metrics rather than via https://github.com/vishvananda/netlink that the CRI-O implementation uses for network metrics

cc: @mikebrow

https://github.com/opencontainers/runc/blob/main/libcontainer/container_linux.go#L152

@zouyee
Copy link
Contributor Author

zouyee commented Mar 21, 2025

@dcantah @mikebrow PTAL

Copy link
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

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

LGTM

@mikebrow mikebrow merged commit 32dca23 into containerd:main Mar 25, 2025
8 checks passed
@mikebrow
Copy link
Member

I am thinking if I can use this in containerd/containerd#10691 for getting the network metrics rather than via https://github.com/vishvananda/netlink that the CRI-O implementation uses for network metrics

cc: @mikebrow

Will have to review the delta between using the NetworkStats returned from libcontainer through runc with the vishvananda/netlink code base.. probably do a review? @MikeZappa87 thoughts?

@MikeZappa87
Copy link

@mikebrow I am not sure how this repo fits together. Is this between the shim and the containerd?

@akhilerm
Copy link
Member

@mikebrow I am not sure how this repo fits together. Is this between the shim and the containerd?

I think its more about checking if there is any difference between the metrics that is provided via netlink code which CRI-O uses for network metrics and the above implementation that we are using.

@mikebrow
Copy link
Member

@mikebrow I am not sure how this repo fits together. Is this between the shim and the containerd?

Yes this is code/repo defines cgroups 1/2 and we use it in containerd when interacting with runtime engines through the shim. Eg. would be used in pulling in metric we are monitoring and conversion.. well it doesn't yet work for this new type but does for pid/cpu/memory... we're going to need to pipe the netstats through and thus begs the question which metrics are there differences.. needs investigation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants