Re: [lxc-devel] [PATCH] fortify: use reentrant safe strtok_r

2013-04-15 Thread Serge Hallyn
Quoting Dwight Engen (dwight.en...@oracle.com): > Signed-off-by: Dwight Engen Acked-by: Serge E. Hallyn > --- > src/lxc/conf.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/src/lxc/conf.c b/src/lxc/conf.c > index c416da5..917c052 100644 > --- a/src/lxc/conf.c

Re: [lxc-devel] [PATCH] fix lxc-attach usage

2013-04-15 Thread Serge Hallyn
Quoting Dwight Engen (dwight.en...@oracle.com): > This makes it match the manpage and be consistent with lxc-execute > > Signed-off-by: Dwight Engen Acked-by: Serge E. Hallyn > --- > src/lxc/lxc_attach.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/lxc/lxc

Re: [lxc-devel] [PATCH] fortify: minor cleanups for unused variables, stricter types

2013-04-15 Thread Serge Hallyn
Quoting Dwight Engen (dwight.en...@oracle.com): > Signed-off-by: Dwight Engen Acked-by: Serge E. Hallyn > --- > src/lxc/log.c | 1 - > src/lxc/log.h | 2 +- > src/lxc/lxccontainer.c | 4 ++-- > src/lxc/network.c | 1 - > src/lxc/state.c| 7 --- > 5 files chan

Re: [lxc-devel] [PATCH] fortify: check the value returned from write(2)

2013-04-15 Thread Serge Hallyn
Quoting Dwight Engen (dwight.en...@oracle.com): > Also check that we wrote the amount we expected to. The write on the pty > is blocking but we could still get a short write on EINTR, so we should > SYSERROR it. > > Signed-off-by: Dwight Engen Acked-by: Serge E. Hallyn > --- > src/lxc/lxc_con

Re: [lxc-devel] [PATCH v2] fix checking hook script exit code

2013-04-15 Thread Serge Hallyn
Quoting Dwight Engen (dwight.en...@oracle.com): > pclose returns the exit status from wait, we need to check that to see if > the script itself failed or not. Tested a script that returned 0, 1, and > also one that did a sleep and then was killed by a signal. > > Signed-off-by: Dwight Engen Acke

Re: [lxc-devel] [PATCH] Use container specific domain socket name

2013-04-15 Thread Daniel Lezcano
On 04/15/2013 07:18 PM, Serge Hallyn wrote: > Quoting Daniel Lezcano (daniel.lezc...@free.fr): >> On 04/15/2013 07:53 AM, S.Çağlar Onur wrote: >>> Hi Daniel, >>> >>> >>> On Sun, Apr 14, 2013 at 4:42 PM, Daniel Lezcano >>> mailto:daniel.lezc...@free.fr>> wrote: >>> >>> On 04/14/2013 09:56 PM, S.

[lxc-devel] [PATCH] fix lxc-attach usage

2013-04-15 Thread Dwight Engen
This makes it match the manpage and be consistent with lxc-execute Signed-off-by: Dwight Engen --- src/lxc/lxc_attach.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lxc/lxc_attach.c b/src/lxc/lxc_attach.c index 77039fb..e5619df 100644 --- a/src/lxc/lxc_attach.c +++

[lxc-devel] [PATCH] fortify: minor cleanups for unused variables, stricter types

2013-04-15 Thread Dwight Engen
Signed-off-by: Dwight Engen --- src/lxc/log.c | 1 - src/lxc/log.h | 2 +- src/lxc/lxccontainer.c | 4 ++-- src/lxc/network.c | 1 - src/lxc/state.c| 7 --- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/lxc/log.c b/src/lxc/log.c index 68a181

[lxc-devel] [PATCH] fortify: check the value returned from write(2)

2013-04-15 Thread Dwight Engen
Also check that we wrote the amount we expected to. The write on the pty is blocking but we could still get a short write on EINTR, so we should SYSERROR it. Signed-off-by: Dwight Engen --- src/lxc/lxc_console.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/lxc/

Re: [lxc-devel] [PATCH 2/2] Support stopping containers concurrently

2013-04-15 Thread S . Çağlar Onur
Hi Serge, I find some free time today so I just sent them again for review. On Mon, Apr 15, 2013 at 2:00 PM, S.Çağlar Onur wrote: > Hi Serge, > > Thanks for the review. If you are not in a hurry I can send another round > that includes your suggestions in couple of days. > > Best, > > > On Mo

[lxc-devel] [PATCH] fortify: use reentrant safe strtok_r

2013-04-15 Thread Dwight Engen
Signed-off-by: Dwight Engen --- src/lxc/conf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c index c416da5..917c052 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -750,7 +750,7 @@ static int setup_tty(const struct lxc_rootfs *rootfs

[lxc-devel] [PATCH 1/2] Support starting containers concurrently

2013-04-15 Thread S . Çağlar Onur
From: "S.Çağlar Onur" Trying to start multiple containers concurrently may cause lxc_monitor_read_timeout to fail as select call could be interrupted by a signal, handle it. --- src/lxc/state.c |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/lxc/state.c b/sr

[lxc-devel] [PATCH 2/2] Support stopping containers concurrently

2013-04-15 Thread S . Çağlar Onur
From: "S.Çağlar Onur" Trying to stop multiple containers concurrently ends up with "cgroup is not mounted" errors as multiple threads corrupts the shared variables. Fix that stack corruption and start to use getmntent_r to support stopping multiple containers concurrently. --- src/lxc/cgroup.c

Re: [lxc-devel] [PATCH] Use container specific domain socket name

2013-04-15 Thread S . Çağlar Onur
Hi Serge, I was just following your lead as you said you don't wan't any long running monitor daemon :) Also I'm not sure how does that daemon is going to help starting multiple containers concurrently using only API. I'm guessing the first request will cause that daemon to start and it will never

Re: [lxc-devel] [PATCH 2/2] Support stopping containers concurrently

2013-04-15 Thread S . Çağlar Onur
Hi Serge, Thanks for the review. If you are not in a hurry I can send another round that includes your suggestions in couple of days. Best, On Mon, Apr 15, 2013 at 1:12 PM, Serge Hallyn wrote: > Quoting S.Çağlar Onur (cag...@10ur.org): > > From: "S.Çağlar Onur" > > > > Trying to stop multiple

[lxc-devel] [PATCH v2] fix checking hook script exit code

2013-04-15 Thread Dwight Engen
pclose returns the exit status from wait, we need to check that to see if the script itself failed or not. Tested a script that returned 0, 1, and also one that did a sleep and then was killed by a signal. Signed-off-by: Dwight Engen --- src/lxc/conf.c | 11 ++- 1 file changed, 10 insert

Re: [lxc-devel] [PATCH] Use container specific domain socket name

2013-04-15 Thread Serge Hallyn
Quoting Daniel Lezcano (daniel.lezc...@free.fr): > On 04/15/2013 07:53 AM, S.Çağlar Onur wrote: > > Hi Daniel, > > > > > > On Sun, Apr 14, 2013 at 4:42 PM, Daniel Lezcano > > mailto:daniel.lezc...@free.fr>> wrote: > > > > On 04/14/2013 09:56 PM, S.Çağlar Onur wrote: > > > Hi all, > > >

Re: [lxc-devel] [PATCH 2/2] Support stopping containers concurrently

2013-04-15 Thread Serge Hallyn
Quoting S.Çağlar Onur (cag...@10ur.org): > From: "S.Çağlar Onur" > > Trying to stop multiple containers concurrently ends up with "cgroup is not > mounted" errors as multiple threads corrupts the shared variables. > Fix that stack corruption and start to use getmntent_r to support stopping > mu

Re: [lxc-devel] [PATCH] Use container specific domain socket name

2013-04-15 Thread S . Çağlar Onur
Hi Daniel, Seems like my assumption was wrong (I was under the impression that calling setsockopt with SO_BROADCAST will require root privileges) as I was able to send fake state updates with my user account using following fake client; #include #include #include #include #include #include

Re: [lxc-devel] [PATCH] Use container specific domain socket name

2013-04-15 Thread S . Çağlar Onur
Hi Daniel, On Mon, Apr 15, 2013 at 5:14 AM, Daniel Lezcano wrote: > On 04/15/2013 07:53 AM, S.Çağlar Onur wrote: > > Hi Daniel, > > > > > > On Sun, Apr 14, 2013 at 4:42 PM, Daniel Lezcano > > mailto:daniel.lezc...@free.fr>> wrote: > > > > On 04/14/2013 09:56 PM, S.Çağlar Onur wrote: > >

Re: [lxc-devel] [PATCH] Enable support for chroot on busybox hosts

2013-04-15 Thread Purcareata Bogdan-B43198
Hello, Thank you very much for your reply! I'm sorry for sending this in a hurry, and not providing enough explanations. Please find my additional comment inline. Thank you, Bogdan P. > -Original Message- > From: Serge Hallyn [mailto:serge.hal...@ubuntu.com] > Sent: Tuesday, April 09, 2

[lxc-devel] [ lxc-Bugs-3610837 ] lxc-execute hangs with interactive shell

2013-04-15 Thread SourceForge . net
Bugs item #3610837, was opened at 2013-04-14 07:46 Message generated for change (Tracker Item Submitted) made by sm111 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=826303&aid=3610837&group_id=163076 Please note that this message will contain a full copy of the co

Re: [lxc-devel] [PATCH RFC] Fix up struct lxc_container locking

2013-04-15 Thread Seth Arnold
On Thu, Apr 11, 2013 at 11:43:31AM -0500, Serge Hallyn wrote: > 1. in container_free, set c->privlock to NULL before calling > sem_destroy, to prevent a window where another thread could call > sem_wait(c->privlock) while c->privlock is not NULL but is already > destroyed. > > 2. in container_get,

Re: [lxc-devel] [PATCH] Use container specific domain socket name

2013-04-15 Thread Daniel Lezcano
On 04/15/2013 07:53 AM, S.Çağlar Onur wrote: > Hi Daniel, > > > On Sun, Apr 14, 2013 at 4:42 PM, Daniel Lezcano > mailto:daniel.lezc...@free.fr>> wrote: > > On 04/14/2013 09:56 PM, S.Çağlar Onur wrote: > > Hi all, > > > > I had some free time today so I tried to implement something