lxc / lxcfs

FUSE filesystem for LXC
https://linuxcontainers.org/lxcfs
Other
1.04k stars 251 forks source link

Trying to run lxcfs inside a container with cgroups v2 #598

Closed LiaoSirui closed 1 year ago

LiaoSirui commented 1 year ago

code is https://github.com/lxc/lxcfs/tree/lxcfs-5.0.3

when on the host machine

i got the right gc

image

but in container, it is empty

i am using cgroups v2, in container, cgroups is like:

image

on the host machine:

image

container is already to add hostPid: true

LiaoSirui commented 1 year ago

image

it is empty, but on the host:

hierarchies:
  0: fd:   6: cpuset,cpu,io,memory,hugetlb,pids,rdma,misc
mihalicyn commented 1 year ago

Hi @LiaoSirui

List of the cgroup-v2 controllers is based on the cgroup.controllers file.

https://docs.kernel.org/admin-guide/cgroup-v2.html#enabling-and-disabling