Hi,

it looks like the current detection of already started container doesn't
work properly (cgroups is trying to be moved before socket command is
created), making Serge fix (97d3756cbe10) useless.

Attached patch adds similar warning when moving / deleting cgroups
fails.


-- 
Frederic Crozat <fcro...@suse.com>
SUSE
>From abce2e8ee2cc07c1273dff7786902393a28108de Mon Sep 17 00:00:00 2001
From: Frederic Crozat <fcro...@suse.com>
Date: Fri, 27 Apr 2012 15:57:02 +0200
Subject: [PATCH] give a hint if old cgroup can't be moved

When cgroup can't be moved, it might be a hint container is already
running.
---
 src/lxc/cgroup.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/lxc/cgroup.c b/src/lxc/cgroup.c
index 9af199d..e5d9dde 100644
--- a/src/lxc/cgroup.c
+++ b/src/lxc/cgroup.c
@@ -369,6 +369,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.7.7

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Lxc-devel mailing list
Lxc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-devel

Reply via email to