-
cgmanager: put unprivileged containers under $(curcgroup)/lxc/$(container0 · 515b3dadSerge Hallyn authored
Currently if we are in /user.slice/user-1000.slice/session-c2.scope, and we start an unprivileged container t1, it will be in cgroup 3:memory:/user.slice/user-1000.slice/session-c2.scope/t1. If we then do a 'lxc-cgroup -n t1 freezer.tasks', cgm_get will first switch to 3:memory:/user.slice/user-1000.slice/session-c2.scope then look up 't1's values. The reasons for this are 1. cgmanager get_value is relative to your own cgroup, so we need to be sure to be in t1's cgroup or an ancestor 2. we don't want to be in the container's cgroup bc it might freeze us. But in Ubuntu 15.04 it was decided that 3:memory:/user.slice/user-1000.slice/session-c2.scope/tasks should not be writeable by the user, making this fail. Therefore put all unprivileged cgroups under "lxc/%n". That way the "lxc" cgroup should always be owned by the user so that he can enter. Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
515b3dad
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| include | Loading commit data... | |
| lua-lxc | Loading commit data... | |
| lxc | Loading commit data... | |
| python-lxc | Loading commit data... | |
| tests | Loading commit data... | |
| Makefile.am | Loading commit data... |