Skip to content

support network metrics for cgroupv2#361

Merged
mikebrow merged 1 commit into
containerd:mainfrom
zouyee:network
Mar 25, 2025
Merged

support network metrics for cgroupv2#361
mikebrow merged 1 commit into
containerd:mainfrom
zouyee:network

Conversation

@zouyee

@zouyee zouyee commented Mar 19, 2025

Copy link
Copy Markdown
Contributor

xref: #81

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

@akhilerm akhilerm left a comment

Copy link
Copy Markdown
Member

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

Comment thread cgroup2/stats/metrics.proto
@zouyee

zouyee commented Mar 21, 2025

Copy link
Copy Markdown
Contributor Author

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

zouyee commented Mar 21, 2025

Copy link
Copy Markdown
Contributor Author

@dcantah @mikebrow PTAL

@mikebrow mikebrow left a comment

Copy link
Copy Markdown
Member

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
@mikebrow

Copy link
Copy Markdown
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
Copy Markdown
Member

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

@akhilerm

Copy link
Copy Markdown
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
Copy Markdown
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