[lxc-users] Disappearing cgroups
ben at bristolwireless.net
Tue Oct 1 10:56:58 UTC 2019
another troubling question from me. This has been stopping me using
LXC for production environments for a good few years now. The problem
persists with LXC 3.0 so I'm finally trying to get some help (got
nothing on the IRC when I tried).
I have number of containers that I have running via my unprivileged
user account, 'lxcadmin'. They function fine, except for one thing.
Their cgroup membership disappears on occasion.
I've set the groups I want to be loaded in /etc/pam.d/common-session
and /etc/pam.d/common-session-noninteractive like this:
session optional pam_cgfs.so -c
Those options seem to propagate fine. I can run containers in two ways:
1/ By logging in as root, then su - lxcadmin.
2/ By logging is as lxcadmin directly via ssh.
When I do 1/ - cgroups live at
When I do 2/ - cgroups live at
I'm not sure which is preferable for security. I assume this is a
systemd thing. In any case, I lose cgroups for sure when using 2/.
Some of them just disappear, not sure why. I've log in again at some
point and few cgroups have disappeared, blkio is gone for example.
I LXC 2.0 the memory cgroup directory had disappeared for the
container, which made the container too dangerous to use. Now in LXC
3.0 I lose a few others, but memory is maintained.
* How can I find out why the cgroups are disappearing? I've found
nothing in the logs. Any help
* Which user should I be logging in as?
* A long shot perhaps, but, why are my cgroups disappearing?
More information about the lxc-users