-
Notifications
You must be signed in to change notification settings - Fork 250
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
seems to not work in chroot #502
Comments
LXCFS is a FUSE filesystem, so to run it, you need access to FUSE (/dev/fuse and /sys/fs/fuse/connections). All this is usually done automatically by container managers. |
hi, I set it up manually as it is not lxd/lxc but a custom chroot where i put the process in a cgroup too i have inside this 'container' lxcfs on /proc/cpuinfo type fuse.lxcfs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other) in the chroot but mounted with /var/lib/lxcfs/proc/cpuinfo /proc/cpuinfo none bind,fuse.rw,nosuid,nodev,relatime,user_id=0,group_id=0 0 0 @testlxcfs:[~]: cat /proc/meminfo [~]: cat /sys/fs/cgroup/testlxcfs/memory.limit_in_bytes is there a way to debug to see if it search the info at the wrong place ? regards, ps lxcfs 4.0.11. |
i must add, the "container" is in a mount namespace and the system mount the lxcfs inside it after starting the fake init process. |
do lxcfs workif the process are not in a pid namespace but only in a cgroup ? |
Yeah, most features should work. We have had people send us patches for that. |
hi, i tried a testbed with a chroot: I created a cgroup with limits :
Then mounted the proc and the lxcfs on top of it:
then i enter the chroot in the cgroup
so in the chroot the meminfo is not "cgroupized" . cpuinfo etc do not virtualise either. i attach a strace when i do a "free" in the chroot. Did i missed something in my setup ? regards, |
ok, for it to work it seems mounting cgroup is not enough, you have to mount each cgroup in a different mount and cgroup2 in unified like a systemd do it with 20 mounts instead of just one. so it seems to be really looking for a specific cgroup mount space and not just existing cgroup of process :) |
I'm not sure if it's still actual or not. Let's keep this issue for now, but I'm not sure how many people are really interested in running LXCFS in a chroot environment. |
hi,
i was trying to use lxcfs inside a chroot but it seems that the lxcfs do not trigger the virtual system. Could you tell me what is needed at minimum to make it work ( like capabilities ) and how the lxcfs detect and trigger the virtualisation (could not find it in the code but i am not a dev so...) :)
i tried to find by looking the source but i could not. i can mount the FS and i have all my process in cgroups but the limit do not show in the /proc files like meminfo or cpu etc...
thanks a lot for your help !
regards,
Ghislain.
The text was updated successfully, but these errors were encountered: