Skip to content
Commit b428a3a2 authored by Tycho Andersen's avatar Tycho Andersen Committed by Pavel Emelyanov
Browse files

cgroup: don't fail on multi-headed freezer cgroup



Consider the case where --freeze-cgroup=/lxc/foo, but (e.g. with systemd in
lxc), all of the tasks actually live in a set of sub cgroups, e.g.
/lxc/foo/init.scope and others. In this case, we will have a multi-headed
controller, since there is nothing in the common parent. We should just
save the freezer value in all of these heads instead of failing.

Note that this doesn't address the larger problem that only the top level
freezer.state file is c/r'd, or waht happens when the container itself has
frozen tasks but not at the top level. After some discussion, there is no
nice way to atomically test-and-set the cgroup freezer, so we'll need some
other kernel help. But I'll ignore this for now :)

Signed-off-by: default avatarTycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: default avatarPavel Emelyanov <xemul@virtuozzo.com>
parent f91d3f01
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment