Hi,

The attached patch is against 14.11 and fixes a problem with the cgroup
release script.

If CgroupMountpoint is not defined in cgroups.conf, the default value
does not get set and this causes cgroups to not get released. This bug
was introduced in commit 4a5d5cb3864acc14e781a1650fde4f2dcc0042fe
(slurm-14-11-0-0pre1).

Regards,
Pär Lindfors, NSC
>From c627478de3ec645b953daca94e99f25b03c605c2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A4r=20Lindfors?= <[email protected]>
Date: Fri, 6 Feb 2015 17:53:32 +0100
Subject: [PATCH] Use default value when CgroupMountpoint is not defined

When CgroupMountpoint was not defined in cgroup.conf the mount point
got undefined. This resulted in cgroups not being released.
---
 etc/cgroup.release_common.example.in | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/etc/cgroup.release_common.example.in b/etc/cgroup.release_common.example.in
index f2a82f7..f642cc3 100644
--- a/etc/cgroup.release_common.example.in
+++ b/etc/cgroup.release_common.example.in
@@ -21,12 +21,10 @@ get_mount_dir()
     local lssubsys=$(type -p lssubsys)
     if [[ $lssubsys ]]; then
         $lssubsys -m $subsystem | awk '{print $2}'
+    elif X=$(grep -si -m1 "^CgroupMountpoint=" @sysconfdir@/cgroup.conf); then
+        echo $X | sed "s/.*=\(.*\)/\1\/${subsystem}/"
     else
-        if [ -f @sysconfdir@/cgroup.conf ]; then
-            grep -i "^CgroupMountpoint=" @sysconfdir@/cgroup.conf | sed "s/.*=\(.*\)/\1\/${subsystem}/" | head -n 1
-        else
-            echo "/cgroup/$subsystem"
-        fi
+        echo "/cgroup/$subsystem"
     fi
 }
 
-- 
1.9.1

Reply via email to