[cgmanager-devel] cgmanager fails if controller is not enabled
Serge Hallyn
serge.hallyn at ubuntu.com
Sun Oct 12 20:37:26 UTC 2014
Thanks, applied upstream.
So now I wonder whether
"do_move_pid_main: don't break out of while loop on error; return error after"
should be reverted, or whether it still makes sense.
Quoting cgmanager at wodny.org (cgmanager at wodny.org):
> Hi,
>
> there has been some struggle with a systemd-shim + cgmanager solution in
> Debian[1]. It seems that root of the problem is that Debian kernel
> announces a memory controller in /proc/cgroups but it is disabled (the
> value in the enabled column is 0).
>
> I have developed a quick fix to that problem (patch attached) and I
> would like to ask for a review.
>
> [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=757348
>
> --
> Marcin Szewczyk http://wodny.org
> mailto:Marcin.Szewczyk at wodny.borg <- remove b / usuĊ b
> xmpp:wodny at ubuntu.pl xmpp:wodny at jabster.pl
> From f9e01540decd7f55cbb8a2057249b93c5384801c Mon Sep 17 00:00:00 2001
> From: Marcin Szewczyk <marcin.szewczyk at 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
>
More information about the cgmanager-devel
mailing list