File lxc-cgroup-already-running.patch of Package lxc

From abce2e8ee2cc07c1273dff7786902393a28108de Mon Sep 17 00:00:00 2001
From: Frederic Crozat <fcrozat@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(-)

Index: lxc-0.8.0/src/lxc/cgroup.c
===================================================================
--- lxc-0.8.0.orig/src/lxc/cgroup.c
+++ lxc-0.8.0/src/lxc/cgroup.c
@@ -434,6 +434,9 @@ static int lxc_one_cgroup_create(const c
 	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;
 		}
 	}
openSUSE Build Service is sponsored by