FWIW something like:

for d in `tail -n +2 /tmp/2 | awk '{
        if ($2 == 0)
                print $1
        else if (a[$2])
                a[$2] = a[$2]","$1
        else
                a[$2]=$1
};END{
        for(i in a) {
                print a[i]
        }
}'`; do
        mkdir -p /sys/fs/cgroup/$d
        mountpoint -q /sys/fs/cgroup/$d || (mount -n -t cgroup -o $d cgroup 
/sys/fs/cgroup/$d || rmdir /sys/fs/cgroup/$d || true)
 done

seems to work.  Again excluding the possibility of unified hierarchy,
which I've not tested.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to cgroup-lite in Ubuntu.
https://bugs.launchpad.net/bugs/1668724

Title:
  fails to mount cgroupfs inside containers running on 16.04

Status in cgroup-lite package in Ubuntu:
  Triaged
Status in cgroup-lite source package in Precise:
  New
Status in cgroup-lite source package in Trusty:
  New
Status in cgroup-lite source package in Xenial:
  New
Status in cgroup-lite source package in Yakkety:
  New

Bug description:
  I need to run nested Ubuntu 12.04 and 14.04 containers on 16.04 hosts,
  and have noticed that the cgroups-mount 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.

  ===========  SRU Justification ================
  Impact: nested containers fail to start
  Reproduce:  create a root owned container;  install lxc and cgroup-lite;  
create a container, and try to start it.  Starting will fail if cgroup-lite is 
running in the first level container without this patch.
  Regression potential:  should be low, it's possible that the regexp is simply 
wrong for some cases.
  ===============================================

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cgroup-lite/+bug/1668724/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to