[lxc-devel] [PATCH 3/6] give a hint if old cgroup can't be moved

Serge Hallyn serge.hallyn at ubuntu.com
Tue Feb 19 19:49:33 UTC 2013


Quoting Jiri Slaby (jslaby at suse.cz):
> From: Frederic Crozat <fcrozat at suse.com>
> 
> When cgroup can't be moved, it might be a hint container is already
> running.

This becomes obsolete with the patch I sent last week.  (Mind you, it
reminds us that we need to make sure the monitor test for this
condition is working, since multiple containers with the same
name but in different places are now allowed - but I'm pretty sure it must
be)

> ---
>  src/lxc/cgroup.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/src/lxc/cgroup.c b/src/lxc/cgroup.c
> index 28f3474..6630d6c 100644
> --- a/src/lxc/cgroup.c
> +++ b/src/lxc/cgroup.c
> @@ -560,6 +560,9 @@ static int lxc_one_cgroup_create(const char *name,
>  	if (!access(cgname, F_OK) && rmdir(cgname)) {
>  		if (try_to_move_cgname(cgparent, cgname)) {
>  			SYSERROR("failed to remove previous cgroup '%s'", cgname);
> +			ERROR("##");
> +			ERROR("# The container might be already running!");
> +			ERROR("##");
>  			return -1;
>  		}
>  	}
> -- 
> 1.8.1.2
> 
> 




More information about the lxc-devel mailing list