Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 503134 - sys-apps/openrc: rc_cgroup_* in rc.conf should be used as default settngs, not overrides for per-service conf.d files
Summary: sys-apps/openrc: rc_cgroup_* in rc.conf should be used as default settngs, no...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-01 16:26 UTC by Austin S. Hemmelgarn
Modified: 2016-09-06 23:20 UTC (History)
2 users (show)

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


Attachments
fix-config.patch (fix-config.patch,972 bytes, patch)
2016-09-05 16:09 UTC, William Hubbs
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Austin S. Hemmelgarn 2014-03-01 16:26:48 UTC
Using OpenRC 0.12.4, setting rc_cgroup_X in /etc/rc.conf overrides any value of the same variable in per-service files in /etc/conf.d

While I understand that rc.conf overriding per-service variables is useful (and in fact an important safety net when it comes to a number of the settings there), with cgroups it should allow setting defaults for services that don't override them so that admins don't have to go through dozens of files in /etc/conf.d and change each one of them when the default policy changes.

From my point of view, there are a couple solutions to this:
1. Add new variable rc_default_cgroup_X for each cgroup type and have that set defaults if rc_cgroup_X isn't defined in rc.conf or the service's conf.d file. (This is probably the best option, it dosen't break current expectations and still improves functionality).
2. Add new variable rc_{force,all,override}_cgroup_X to provide current functionality, and have rc_cgroup_X in rc.conf give defaults for services without rc_cgroup_X set in /etc/conf.d
Comment 1 dwfreed 2016-09-05 11:38:11 UTC
I like #1.
Comment 2 William Hubbs gentoo-dev 2016-09-05 16:09:59 UTC
Created attachment 445038 [details, diff]
fix-config.patch

This patch is the way I would prefer to fix this. We should load the
global config first, then let each service override it.

I haven't done this, because I don't have a feel for the breakage it
would cause.
Comment 3 William Hubbs gentoo-dev 2016-09-06 23:20:38 UTC
https://github.com/openrc/openrc/commit/d4d5593

applies the patch I attached to this bug along with an update to the
NEWS file. This will be in OpenRC-0.22.