Skip to content

cgroup_cleanup never runs #910

@zhasha

Description

@zhasha

Because of the first line cgroup_running || return 0 which calls out to an erroneous check that will always fail. On cgroups v2 it checks the paths for $RC_SVCNAME but the actual name is openrc.$RC_SVCNAME.

diff --git a/sh/rc-cgroup.sh b/sh/rc-cgroup.sh
index f10e328c..631754a0 100644
--- a/sh/rc-cgroup.sh
+++ b/sh/rc-cgroup.sh
@@ -49,8 +49,8 @@ cgroup_get_pids()
 
 cgroup_running()
 {
-       [ -d "/sys/fs/cgroup/unified/${RC_SVCNAME}" ] ||
-                       [ -d "/sys/fs/cgroup/${RC_SVCNAME}" ] ||
+       [ -d "/sys/fs/cgroup/unified/openrc.${RC_SVCNAME}" ] ||
+                       [ -d "/sys/fs/cgroup/openrc.${RC_SVCNAME}" ] ||
                        [ -d "/sys/fs/cgroup/openrc/${RC_SVCNAME}" ]
 }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions