containerd / rust-extensions

Rust crates to extend containerd
https://containerd.io
Apache License 2.0
184 stars 73 forks source link

Feature: shim: Complete the metrics collection for cgroup v1 #275

Open zzzzzzzzzy9 opened 6 months ago

zzzzzzzzzy9 commented 6 months ago

Complete the metrics collection for cgroup v1 so that containerd can obtain complete metrics information

zzzzzzzzzy9 commented 5 months ago

@mxpv

zzzzzzzzzy9 commented 5 months ago

@Burning1020

Burning1020 commented 5 months ago

Got you. Will review it...

Mossaka commented 5 months ago

I think it's great to have a complete cgroupv1 stats collection, but given https://github.com/containerd/rust-extensions/issues/258 suggests that the complex logic of cgroups stats should not reside in the shim crate, I would recommend that we should take a look at if libcgroups could be of use.

In particular, libcgroups maintained by youki has cgroups v1 and v2 StatsProvider (source), so we don't need to duplicate the effort in this repo.

I am fully aware that we are using cgroups-rs, so what I am proposing here is to evaluate whether or not libcgroups satisfies our requirements and can replace cgroups-rs.

CC @utam0k

utam0k commented 5 months ago

I'm happy to collaborate with you if possible!

mxpv commented 5 months ago

Hey @Mossaka, can you give a bit more context on cgroups-rs vs libcgroups ?