[lxc-users] using cgroups

Serge E. Hallyn serge at hallyn.com
Fri Jul 1 15:02:27 UTC 2016


Quoting rob e (redgerhoo at yahoo.com.au):
> On 01/07/16 10:58, Serge E. Hallyn wrote:
> >Quoting rob e (redgerhoo at yahoo.com.au):
> >Let's address them one at a time.  For starters,
> >
> >if you only leave in the
> >	lxc.cgroup.cpuset.cpus = 1-3
> >does that now work?  If not, please post the log output to show exactly
> >how it fails.
> >And if you only have
> >	lxc.cgroup.memory.limit_in_bytes = 4G
> >how does that fail, exactly?
> >
> >Also, what is /proc/self/cgroup now when you login?
> >
> >_______________________________________________
> >lxc-users mailing list
> >lxc-users at lists.linuxcontainers.org
> >http://lists.linuxcontainers.org/listinfo/lxc-users
> hi Serge,
> thanks for the response, data follows
> 
> --------------------------------------
> From "my" session
> $ cat /proc/self/cgroup
> 11:blkio:/user.slice
> 10:hugetlb:/
> 9:freezer:/user/redger/2
> 8:pids:/user.slice/user-1000.slice
> 7:memory:/user/redger/2
> 6:cpu,cpuacct:/user.slice
> 5:net_cls,net_prio:/
> 4:perf_event:/
> 3:cpuset:/user/redger/2
> 2:devices:/user.slice
> 1:name=systemd:/user.slice/user-1000.slice/session-11.scope
> 
> --------------------------------------
> Lines from PAM (original commented and new line inserted)
> #session        optional        pam_cgfs.so -c freezer,memory,name=systemd
> session optional        pam_cgfs.so -c freezer,memory,name=systemd,cpuset
> 
> --------------------------------------
> current config for test system - Note Memory limit (only), no other
> cgroup usage
> # Template used to create this container:
> /usr/share/lxc/templates/lxc-download
> # Parameters passed to the template: -d ubuntu -r trusty -a amd64
> # For additional config options, please look at lxc.container.conf(5)
> 
> # Distribution configuration
> lxc.include = /usr/share/lxc/config/ubuntu.common.conf
> lxc.include = /usr/share/lxc/config/ubuntu.userns.conf
> lxc.arch = x86_64
> 
> # Container specific configuration
> lxc.id_map = u 0 100000 65536
> lxc.id_map = g 0 100000 65536
> lxc.rootfs = /mnt/lxc_images/containers/xenial_test_01/rootfs
> lxc.rootfs.backend = dir
> lxc.utsname = xenial_test_01
> 
> # Network configuration
> lxc.network.type = veth
> lxc.network.link = lxcbr0
> lxc.network.flags = up
> lxc.network.hwaddr = 00:16:3e:19:3c:15
> 
> ## Set resource limits   ----- Cause problems in Xenial
> lxc.cgroup.memory.limit_in_bytes = 4G
> 
> --------------------------------------
> And the result of starting (copied and pasted from konsole)
> $ lxc-start -n xenial_test_01 -F -o lxc_test.log -l debug
> lxc-start: cgfsng.c: cgfsng_setup_limits: 1645 No devices cgroup
> setup for xenial_test_01

Wait, why is it still showing this error?  You don't
have any lxc.cgroup.deivces in the above config!

Can you please show

/usr/share/lxc/config/ubuntu.common.conf
/usr/share/lxc/config/ubuntu.userns.conf

?


More information about the lxc-users mailing list