[lxc-devel] Patch for cgroups-lite

Cam Cope cam at dropbox.com
Tue Feb 28 07:42:49 UTC 2017

I need to run nested Ubuntu 12.04 and 14.04 containers on 16.04 hosts, and
have noticed that the cgroups-lite script for mounting the cgroups inside
the containers has stopped working. This is because systemd now comounts
multiple controllers on a single hierarchy, which prevents mounting them
individually inside the container. I haven't been able to find a source
code repository or issue tracker that looks active for this package, so
here's a poor-man's patch:

Change the for-loop under "# get list of cgroup controllers" to:

for c in `tail -n +2 /proc/cgroups | awk '{if(a[$2])a[$2]=a[$2]","$1; else
a[$2]=$1;};END{for(i in a){print a[i]}}'`; do

This groups the controllers by hierarchy and joins them correctly. I would
appreciate it if you could backport this patch to the cgroup-lite packages
on the LTS releases. Thanks!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20170227/5cbcaca0/attachment.html>

More information about the lxc-devel mailing list