On Sun, Oct 12, 2014 at 06:09:46PM +0200, Marcin Szewczyk wrote:
> On Sun, Oct 12, 2014 at 05:25:43PM +0200, Marcin Szewczyk wrote:
> > cgmanager: DEBUG per_ctrl_move_pid_main: 31385, memory - 
> > user.slice/user-1000.slice/session-c13.scope
> > 
> > That means that when systemd-shim calls cgmanager to MovePid/MovePidAbs
> > it uses a special controller name "all". But it seems "all" doesn't
> > include some controllers -- for example "name=systemd".
> > 
> > Questions are:
> > 1) Should cgmanager move pid to "name=systemd" when called with "all"
> >    controller?
> 
> So, I think it should and it would. I omitted very important line from
> my previous log:
> 
> cgmanager: DEBUG per_ctrl_move_pid_main: 31385, memory - 
> user.slice/user-1000.slice/session-c13.scope
> cgmanager: Found no cgroup entry for pid 31388 controller memory
> 
> The thing is -- cgmanager jumps out from the "all" loop after some
> problem with the "memory" controller. I do not know what to do with it
> yet.

I have applied a patch (attached) to cgmanager and everything seems to
work now. I will send it to cgmanager maintainer and upstream to ask if
it makes sense.

-- 
Marcin Szewczyk                       http://wodny.org
mailto:marcin.szewc...@wodny.borg  <- remove b / usuĊ„ b
xmpp:wo...@ubuntu.pl                  xmpp:wo...@jabster.pl
>From f9e01540decd7f55cbb8a2057249b93c5384801c Mon Sep 17 00:00:00 2001
From: Marcin Szewczyk <marcin.szewc...@wodny.org>
Date: Sun, 12 Oct 2014 18:45:58 +0200
Subject: [PATCH] check "enabled" column when parsing /proc/cgroups

---
 fs.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/fs.c b/fs.c
index 827e95f..cdfcc92 100644
--- a/fs.c
+++ b/fs.c
@@ -552,6 +552,15 @@ static bool collect_kernel_subsystems(void)
 			continue;
 		*p = '\0';
 
+		// TODO: How stable is /proc/cgroups interface?
+		// Check the 'enabled' column
+		p = strrchr(p+1, '\t');
+		if (!p)
+			continue;
+
+		if (*(p+1) != '1')
+			continue;
+
 		if (!save_mount_subsys(line)) {
 			nih_fatal("Error storing subsystem %s", line);
 			goto out;
-- 
2.1.1

Reply via email to