]> git.ipfire.org Git - thirdparty/systemd.git/commit
core: keep supporting cgroup hybrid layout from v232 for live upgrades
authorTejun Heo <htejun@fb.com>
Wed, 23 Nov 2016 17:27:32 +0000 (12:27 -0500)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 20 Feb 2017 17:28:44 +0000 (12:28 -0500)
commitf08e9287200772c9a201d9f988dd78ffe2fc7ea4
tree02419720dbdfa49afac29335ce57ab2461914c3c
parent2977724b09eb997fc84a80517447b5d4a70770c7
core: keep supporting cgroup hybrid layout from v232 for live upgrades

v232's cgroup hybrid mode mounted v2 on /sys/fs/cgroup/systemd, which
unfortunately broke other tools which expect v1 there.  From v233 on, hybrid
mode instead mounts and uses v2 on /sys/fs/cgroup/unified and keeps
/sys/fs/cgroup/systemd on v1 for compatibility with external tools.  However,
to keep systemd live upgrades working, v233+ should be able to recognize v232
layout and keep using it.

This patch adds v232 hybrid mode support.  If v232 layout is detected,
cg_unified(SYSTEMD_CGRouP_CONTROLLER) keeps returning %true but
cg_hybrid_unified() returns %false.  This keeps process management on cgroup v2
but turns off the parallel layout.
src/basic/cgroup-util.c