Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 602706 - sys-apps/portage: systemd support for FEATURES=cgroup
Summary: sys-apps/portage: systemd support for FEATURES=cgroup
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
Depends on:
Reported: 2016-12-14 21:16 UTC by Zac Medico
Modified: 2022-04-06 14:36 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Zac Medico gentoo-dev 2016-12-14 21:16:57 UTC
Currently, FEATURES=cgroup fails under systemd, as follows:

  File "_emerge/", line 88, in _start
    os.mkdir(cgroup_portage, 0o755)
  File "portage/", 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:
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.