[lxc-users] using cgroups

Serge E. Hallyn serge at hallyn.com
Thu Jun 30 01:35:57 UTC 2016


On Thu, Jun 30, 2016 at 11:24:25AM +1000, Rob wrote:
> On 30/06/2016 10:36 AM, Serge E. Hallyn wrote:
> >Quoting Rob Edgerton (redgerhoo at yahoo.com.au):
> >>       lxc-start 20160628155820.614 ERROR    lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1662 - No such file or directory - Error setting cpuset.cpus to 1-3 for trusty_unp_ibvpn
> >ENOENT - that's unexpected...
> >
> >>       lxc-start 20160628155820.615 ERROR    lxc_start - start.c:lxc_spawn:1180 - failed to setup the cgroup limits for @virt-host:~$cgm --version
> >>0.29
> >Can you show 'dpkg -l | grep cgmanager' ?
> >
> >as well as cat /etc/*release
> >
> >Hi, For /proc/self/cgroup and /proc/self/mountinfo, we actually
> >need to see the contents. Can you show 'cat /proc/self/cgroup' and
> >'cat /proc/self/mountinfo'? -serge
> >_______________________________________________ lxc-users mailing
> >list lxc-users at lists.linuxcontainers.org
> >http://lists.linuxcontainers.org/listinfo/lxc-users
> hi Serge,
> here is the follow up info (note that I cut the msg above in order
> to reduce size)
> 
> $ dpkg -l | grep cgmanager
> ii  cgmanager 0.39-2ubuntu5                              amd64
> Central cgroup manager daemon
> ii  libcgmanager0:amd64 0.39-2ubuntu5
> amd64        Central cgroup manager daemon (client library)
> 
> $ cat /etc/*release
> DISTRIB_ID=Ubuntu
> DISTRIB_RELEASE=16.04
> DISTRIB_CODENAME=xenial
> DISTRIB_DESCRIPTION="Ubuntu 16.04 LTS"
> NAME="Ubuntu"
> VERSION="16.04 LTS (Xenial Xerus)"
> ID=ubuntu
> ID_LIKE=debian
> PRETTY_NAME="Ubuntu 16.04 LTS"
> VERSION_ID="16.04"
> HOME_URL="http://www.ubuntu.com/"
> SUPPORT_URL="http://help.ubuntu.com/"
> BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
> UBUNTU_CODENAME=xenial
> 
> 
> $ cat /proc/self/cgroup
> 11:blkio:/user.slice
> 10:hugetlb:/
> 9:freezer:/user/redger/1
> 8:pids:/user.slice/user-1000.slice
> 7:perf_event:/
> 6:cpu,cpuacct:/user.slice
> 5:net_cls,net_prio:/
> 4:devices:/user.slice
> 3:memory:/user/redger/1
> 2:cpuset:/

Oh, ok.  I'm sorry, this should have been obvious to me from the start.

You need to edit /etc/pam.d/common-session and change the line that's
something like

session optional	pam_cgfs.so -c freezer,memory,name=systemd

to add ",cpuset" at the end, i.e.

session optional	pam_cgfs.so -c freezer,memory,name=systemd,cpuset

It has been removed from the default because on systems which do a lot
of cpu hotplugging it can be a problem:  with the legacy (non-unified)
cpuset hierarchy, when you unplug a cpu that is part of /user, it gets
removed, but when you re-plug it it does not get re-added.


More information about the lxc-users mailing list