Re: [lxc-devel] Container autostart proposal V2

2013-05-30 Thread Harald Dunkel
Hi Stéphane, On 05/30/13 17:39, Stéphane Graber wrote: > > If we were to use groups for everything, we'd end up having to reserve > "disabled", "autostart", "last-state". > > And then make those 3 conflict so that a container couldn't be in more > than one of those at any given time. > > This seem

Re: [lxc-devel] [PATCH 1/1] api locking: take process lock around open/close

2013-05-30 Thread Serge Hallyn
Quoting Dwight Engen (dwight.en...@oracle.com): > On Wed, 29 May 2013 22:21:22 -0500 > Serge Hallyn wrote: > > > And update the comment explaining the locking. > > > > Also take memlock in want_daemonize. > > Hi Serge, could you explain a bit what the locking is protecting about > open/close? I

[lxc-devel] [PATCH] waitpid at abort to make sure we can rmdir cgroups

2013-05-30 Thread Serge Hallyn
If we abort the container start, and don't wait for the init task to be reaped after we kill it, then we can't remove the container cgroup because it is not empty. Signed-off-by: Serge Hallyn --- src/lxc/start.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lxc/start.c b/src/lxc/

Re: [lxc-devel] Container autostart proposal V2

2013-05-30 Thread Stéphane Graber
On 05/30/2013 11:28 AM, Harald Dunkel wrote: > Hi Stéphane, > > On 05/30/13 15:33, Stéphane Graber wrote: >> >> That's already covered by my proposal and I believe covered in the use >> cases listed within it. >> >> "lxc-stop -g any" >> >> That'll stop all containers that are in the "any" group. "

Re: [lxc-devel] Container autostart proposal V2

2013-05-30 Thread Harald Dunkel
Hi Stéphane, On 05/30/13 15:33, Stéphane Graber wrote: > > That's already covered by my proposal and I believe covered in the use > cases listed within it. > > "lxc-stop -g any" > > That'll stop all containers that are in the "any" group. "any" is > documented as being a special group that contain

Re: [lxc-devel] [PATCH 1/1] api locking: take process lock around open/close

2013-05-30 Thread Serge Hallyn
Quoting Dwight Engen (dwight.en...@oracle.com): > On Wed, 29 May 2013 22:21:22 -0500 > Serge Hallyn wrote: > > > And update the comment explaining the locking. > > > > Also take memlock in want_daemonize. > > Hi Serge, could you explain a bit what the locking is protecting about > open/close? I

Re: [lxc-devel] Container autostart proposal V2

2013-05-30 Thread Michael H. Warfield
On Thu, 2013-05-30 at 09:33 -0400, Stéphane Graber wrote: > On 05/30/2013 02:35 AM, Harald Dunkel wrote: > > Hi folks, > > > > > > If its not too late for a suggestion: > > > > lxc-stop could provide an option -A to shutdown/stop all > > containers, independent from their autostart flag. Worst

Re: [lxc-devel] [PATCH 1/1] api locking: take process lock around open/close

2013-05-30 Thread Dwight Engen
On Wed, 29 May 2013 22:21:22 -0500 Serge Hallyn wrote: > And update the comment explaining the locking. > > Also take memlock in want_daemonize. Hi Serge, could you explain a bit what the locking is protecting about open/close? It looks like you are locking around just the open or just the clos

Re: [lxc-devel] Container autostart proposal V2

2013-05-30 Thread Stéphane Graber
On 05/30/2013 02:35 AM, Harald Dunkel wrote: > Hi folks, > > > If its not too late for a suggestion: > > lxc-stop could provide an option -A to shutdown/stop all > containers, independent from their autostart flag. Worst > case scenario (almost) is that a disk has an IO error and > the config fi

Re: [lxc-devel] build error of utils.h

2013-05-30 Thread Qiang Huang
Please ignore it, there might be something wrong with my box, no code's bad. Sorry for the bother. On 2013/5/30 15:40, Qiang Huang wrote: > Hi, > > I just updated to the latest code and met a build error: > > utils.h:52: error: static declaration of ‘setns’ follows non-static > declaration >

[lxc-devel] build error of utils.h

2013-05-30 Thread Qiang Huang
Hi, I just updated to the latest code and met a build error: utils.h:52: error: static declaration of ‘setns’ follows non-static declaration /usr/local/include/bits/sched.h:93: note: previous declaration of ‘setns’ was here make[3]: *** [liblxc_so-bdev.o] Error 1 latest commit is 39dc698cb4025