cgroup2: use new fstype for unified hierarchy#2112
cgroup2: use new fstype for unified hierarchy#2112alban wants to merge 4 commits intosystemd:masterfrom
Conversation
Since Linux v4.4-rc1, __DEVEL__sane_behavior does not exist anymore and is replaced by a new fstype "cgroup2". torvalds/linux@67e9c74
When the systemd-nspawn is in a cgroup that is not reachable from the current cgroup namespace, we cannot mount the cgroup for the container in any meaningful way. systemd or systemd-nspawn does not lead to this situation. However, the user could use "unshare --cgroup" and then migrate the process outside of its cgroup namespace's root, then run systemd-nspawn.
Disabled by default. Users can opt-in by setting the environment variable CGROUP_NAMESPACE=1.
|
More commits added in this branch implementing cgroup namespaces (CLONE_NEWCGROUP). |
|
I figure we should drop the old __DEVEL__sane_behaviour as soon as 4.4 is out, and probably merge this patch only then too. |
|
I added the "postponed" label, to indicate that this should wait until 4.4 is released. |
|
Hmm I don't see how cgroupns could even work in the legacy hierarchy, as the top-level dir in cgroupfs was always special in the legacy hierarchy, and hat a couple of settings the others didn't have, such as notifier support. Anyway, happy to see cgroups2 and cgroupsns supported, but if both of these only apply to the unified hiearchy anyway, then i'd prefer if we'd just make use of them unconditionally, after all the stuff is in flux anyway, and the fewer options the better. |
|
Replaced by #2332 |
|
@zonque I think you closed the wrong bug here... |
|
Oh, sorry. Indeed. |
|
I guess #2271 replaces this one. |
|
For the record, the status of this branch:
Not merged. TODO.
Replaced by ab2c386
Not merged. TODO.
Merged as 0996199 |
Can we make this the default when we switch to unified hierarchy? |
Yes we could. We should however make sure the kernel supports cgroupns by checking /proc/self/ns/cgroup, and just not use cgroupns if not supported. The commit above does not do this. |
Since Linux v4.4-rc1, __DEVEL__sane_behavior does not exist anymore and
is replaced by a new fstype "cgroup2".
torvalds/linux@67e9c74
Question: should systemd support unified hierarchy both before and after
Linux v4.4-rc1? If so, systemd needs to support both
__DEVEL__sane_behavior and cgroup2.
By the way, systemd-cgls is broken with the unified hierarchy.