cgroups: disable use in older branches
In the bad old days before pid namespaces existed in the kernel, we
had problems with cbuildbot/cros_sdk leaking processes. However, we
were able to use cpuset cgroups to keep track of all processes that
we spawned, and then destroy any dangling ones on exit. So we used
that in cbuildbot & cros_sdk to avoid leaks.
Now that we've had the pid namespace logic in the tree for 7 years,
we should be able to assume that people have this enabled in their
kernels (as all modern distros do). If they're using a weird setup
that doesn't have it, then they probably don't have cgroups either,
and they can get the leaking process behavior.
This patch hacks the cgroups module directly to make it easier to
backport to a ton of historical branches. A more complete fix was
landed in ToT -- see https://crrev.com/c/2640878 for details.
BUG=None
TEST=`cros_sdk` works w/cgroupsv2 & systemd host
Change-Id: Ie94766ce338894659ee4cf5e0ebe37428bf64b46
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/2861412
Tested-by: Mike Frysinger <[email protected]>
Reviewed-by: LaMont Jones <[email protected]>
1 file changed