enhance cgroup support#183
Conversation
|
I'm open to having a prefix, but I don't think we should allow the cgroup name to be configurable. It would bee very easy for users to end up with collisions. Also, I'm curious why you want to add a service to a controller without changing any of its settings? |
It is not a problem if two services end with the same cgroup name, since this setting is only used
I have a centralized script where all the cgroups settings are configured (not only for services). |
268e131 to
b9f0285
Compare
|
Rebased this pull request onto current master. Just as it is in the case of #182 I have OpenRC with this change deployed for few months already on |
b9f0285 to
b8b0b0b
Compare
|
Rebased this pull request onto current master. |
b8b0b0b to
9db531b
Compare
|
Rebased this pull request onto current master. |
|
@maciejsszmigiero question on this PR.
Does it correctly use the |
Add a possibility to: * Set a cgroup name for a service, * Set a cgroup name prefix for services that don't have an explicit cgroup name set by the previous feature. This allows defining, for example, a root "services" cgroup, under which children cgroups for particular services are kept, * Add a service to a controller without needing to set any of its settings, * Keep a service cgroup when it becomes empty (for example to keep between service restarts some cgroup settings that were set outside OpenRC). These functionalities allow configuration of a service cgroup name for v1 controllers and v2 (unified) hierarchy; the service name in the "openrc" hierarchy is not affected by these settings. The default values are set in a way so not to result in any change of services cgroup behavior unless specifically configured in a different way by an user.
9db531b to
c297f67
Compare
|
@robbat2 I guess by "clean up properly" you mean whether all tasks in the old cgroup will get killed in your scenario (rather than just the pid monitored by Currently, this isn't the case. |
Add a possibility to:
Set a cgroup name for a service,
Set a cgroup name prefix for services that don't have an explicit cgroup
name set by the previous feature.
This allows defining, for example, a root "services" cgroup, under which
children cgroups for particular services are kept,
Add a service to a controller without needing to set any of its settings,
Keep a service cgroup when it becomes empty (for example to keep between
service restarts some cgroup settings that were set outside OpenRC).
These functionalities allow configuration of a service cgroup name for v1
controllers and v2 (unified) hierarchy; the service name in the "openrc"
hierarchy is not affected by these settings.
The default values are set in a way so not to result in any change of
services cgroup behavior unless specifically configured in a different way
by an user.