[lxc-devel] [lxc/lxc] deefdf: start: CLONE_NEWCGROUP after we have setup cgroups

GitHub noreply at github.com
Thu Nov 3 21:27:38 UTC 2016


  Branch: refs/heads/master
  Home:   https://github.com/lxc/lxc
  Commit: deefdf8a791cf969ba25a5847844bdf0e58c8f34
      https://github.com/lxc/lxc/commit/deefdf8a791cf969ba25a5847844bdf0e58c8f34
  Author: Christian Brauner <christian.brauner at canonical.com>
  Date:   2016-11-03 (Thu, 03 Nov 2016)

  Changed paths:
    M src/lxc/start.c

  Log Message:
  -----------
  start: CLONE_NEWCGROUP after we have setup cgroups

If we do it earlier we end up with a wrong view of /proc/self/cgroup. For
example, assume we unshare(CLONE_NEWCGROUP) first, and then create the cgroup
for the container, say /sys/fs/cgroup/cpuset/lxc/c, then /proc/self/cgroup
would show us:

     8:cpuset:/lxc/c

whereas it should actually show

     8:cpuset:/

Signed-off-by: Christian Brauner <christian.brauner at canonical.com>


  Commit: f5795427b1577a119b1e260e64b31a8f6b0e2871
      https://github.com/lxc/lxc/commit/f5795427b1577a119b1e260e64b31a8f6b0e2871
  Author: Stéphane Graber <stgraber at stgraber.org>
  Date:   2016-11-03 (Thu, 03 Nov 2016)

  Changed paths:
    M src/lxc/start.c

  Log Message:
  -----------
  Merge pull request #1275 from brauner/2016-11-04/unshare_cgroup_after_clone

start: CLONE_NEWCGROUP after we have setup cgroups


Compare: https://github.com/lxc/lxc/compare/8813bb24f84f...f5795427b157


More information about the lxc-devel mailing list