feat: add --force-render-cgroup args to make lxcfs render in view of specific cgroup#696
feat: add --force-render-cgroup args to make lxcfs render in view of specific cgroup#696okhowang wants to merge 1 commit into
Conversation
|
Hi @okhowang, please, could you sign-off your commit in accordance with our contribution guideline (https://github.com/lxc/lxcfs/blob/main/CONTRIBUTING.md). Also, please, describe your changes and use case. From what I see in the code, you basically force to always use the same cgroup to take data from. Kind regards, |
mihalicyn
left a comment
There was a problem hiding this comment.
I've left a comment before.
bc2daab to
004c7ee
Compare
|
I use in the pattern containers can see each others, and share same resource. because docker will create a new cgroup in I want they all got resource view in |
Now this makes sense. Basically, you don't need all the machinery we have to find init process of the container, then figure out in which cgroups it sits, you want LXCFS to always take all the information from a statically defined cgroup. cc @stgraber, WDYT about this feature? |
At minimum it needs a better name because I still don't understand what it does ;) In general LXCFS is really meant for the needs of LXC and related projects. I don't mind small changes that make Docker's life easier, but I would push back on larger features that we realistically won't care about, may break at any point and could expose us to additional vulnerabilities. I'm not saying it's the case here, but I'd definitely prefer such changes be kept as simple as possible. For us, having LXCFS look up purely based on cgroup isn't useful as 99% of containers we care about run systemd and so create a complex cgroup hierarchy inside the container with basically each process living in a different cgroup. So again, not necessarily opposed to this, but I'd want:
|
eb1c759 to
e684f49
Compare
|
I have renamed options to |
Signed-off-by: okhowang(王沛文) <okhowang@tencent.com>
e684f49 to
f7bf72b
Compare
it's useful in some complex container hierarchy,
many container work in same parent cgroup for sharing resource (cpu and other)
but need inspect total usage of parent cgroup in single container