Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 602706

Summary: sys-apps/portage: systemd support for FEATURES=cgroup
Product: Portage Development Reporter: Zac Medico <zmedico>
Component: CoreAssignee: Portage team <dev-portage>
Status: CONFIRMED ---    
Severity: normal CC: pacho, poncho
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=602664
https://bugs.gentoo.org/show_bug.cgi?id=659582
https://bugs.gentoo.org/show_bug.cgi?id=670714
Whiteboard:
Package list:
Runtime testing required: ---

Description Zac Medico gentoo-dev 2016-12-14 21:16:57 UTC
Currently, FEATURES=cgroup fails under systemd, as follows:

  File "_emerge/AbstractEbuildProcess.py", line 88, in _start
    os.mkdir(cgroup_portage, 0o755)
  File "portage/__init__.py", line 250, in __call__
    rval = self._func(*wrapped_args, **wrapped_kwargs)
OSError: [Errno 30] Read-only file system: b'/sys/fs/cgroup/portage'

It looks like we'll have to use systemd's APIs:

https://www.freedesktop.org/wiki/Software/systemd/ControlGroupInterface/
Comment 1 Zac Medico gentoo-dev 2018-06-29 07:57:19 UTC
In util-linux-2.32, unshare --pid --kill-child implements the desired behavior using a pid namespace, and there's no need for special interaction with systemd.
Comment 2 Zac Medico gentoo-dev 2018-12-13 20:43:29 UTC
Maybe we can deprecate FEATURES=cgroup now that FEATURES=pid-sandbox is available. However, we've got bug 670714 which requests additional cgroup features.