[lxc-devel] about LXC's coding style

2014-01-17 Thread Qiang Huang
Hi Serge and Stéphane and list, I'm sorry but I need to complain about this :( I saw LXC's CONTRIBUTING file, it says: "The coding style follows the Linux kernel coding style" But after reading code these days, there are too many very-long-line codes, especially in cgroup.c, this really cause so

[lxc-devel] [PATCH 1/2] lxc-start: fix the container leak when daemonize

2014-01-17 Thread Qiang Huang
When start container with daemon model, we'll have a new daemon process in lxcapi_start, whose c->numthreads is 2, inherited from his father. Even his father return to main(), the lxc_container_put won't affect son's numthreads. So when daemon stops, he should return to main and do lxc_container_p

[lxc-devel] [PATCH 2/2] daemon: remove pidfile when daemon container is stopped

2014-01-17 Thread Qiang Huang
This is for bug: https://github.com/lxc/lxc/issues/89 When start container with daemon model, the daemon process's father will return back to main in start time, and pidfile is removed then, that's not right. So we store pidfile to lxc_container, and remove it when lxc_container_free. Signed-off-

[lxc-devel] templates and "common.conf"

2014-01-17 Thread lxc
Hi, I was starting conversion to common.conf style for gentoo template. I understand why ubuntu which has more than one template need factoring. I don't understand the point to do it for other "mono-template" distro : "I share common settings with myself" :-) Why don't we make one real common

Re: [lxc-devel] [PATCH] handle unprivileged user calls more gracefully (v2)

2014-01-17 Thread S . Çağlar Onur
On Sat, Jan 18, 2014 at 12:12 AM, Stéphane Graber wrote: > On Sat, Jan 18, 2014 at 12:03:19AM -0500, S.Çağlar Onur wrote: >> On Sat, Jan 18, 2014 at 12:00 AM, Stéphane Graber >> wrote: >> > On Fri, Jan 17, 2014 at 11:58:17PM -0500, S.Çağlar Onur wrote: >> >> On Fri, Jan 17, 2014 at 11:49 PM, Sté

Re: [lxc-devel] [PATCH] handle unprivileged user calls more gracefully (v2)

2014-01-17 Thread Stéphane Graber
On Sat, Jan 18, 2014 at 12:03:19AM -0500, S.Çağlar Onur wrote: > On Sat, Jan 18, 2014 at 12:00 AM, Stéphane Graber wrote: > > On Fri, Jan 17, 2014 at 11:58:17PM -0500, S.Çağlar Onur wrote: > >> On Fri, Jan 17, 2014 at 11:49 PM, Stéphane Graber > >> wrote: > >> > On Fri, Jan 17, 2014 at 11:34:50P

Re: [lxc-devel] [PATCH] handle unprivileged user calls more gracefully (v2)

2014-01-17 Thread S . Çağlar Onur
On Sat, Jan 18, 2014 at 12:00 AM, Stéphane Graber wrote: > On Fri, Jan 17, 2014 at 11:58:17PM -0500, S.Çağlar Onur wrote: >> On Fri, Jan 17, 2014 at 11:49 PM, Stéphane Graber >> wrote: >> > On Fri, Jan 17, 2014 at 11:34:50PM -0500, S.Çağlar Onur wrote: >> >> Return an error if the function is no

Re: [lxc-devel] [PATCH] handle unprivileged user calls more gracefully (v2)

2014-01-17 Thread Stéphane Graber
On Fri, Jan 17, 2014 at 11:58:17PM -0500, S.Çağlar Onur wrote: > On Fri, Jan 17, 2014 at 11:49 PM, Stéphane Graber wrote: > > On Fri, Jan 17, 2014 at 11:34:50PM -0500, S.Çağlar Onur wrote: > >> Return an error if the function is not supposed to be called by an > >> unprivileged user. > >> Otherwi

Re: [lxc-devel] [PATCH] handle unprivileged user calls more gracefully (v2)

2014-01-17 Thread S . Çağlar Onur
On Fri, Jan 17, 2014 at 11:49 PM, Stéphane Graber wrote: > On Fri, Jan 17, 2014 at 11:34:50PM -0500, S.Çağlar Onur wrote: >> Return an error if the function is not supposed to be called by an >> unprivileged user. >> Otherwise those calls fail in the middle of their execution with different >> r

Re: [lxc-devel] [PATCH] handle unprivileged user calls more gracefully (v2)

2014-01-17 Thread Stéphane Graber
On Fri, Jan 17, 2014 at 11:34:50PM -0500, S.Çağlar Onur wrote: > Return an error if the function is not supposed to be called by an > unprivileged user. > Otherwise those calls fail in the middle of their execution with different > reasons. > > changes since v1: > - am_unpriv is now a simple get

Re: [lxc-devel] [PATCH] handle unprivileged user calls more gracefully

2014-01-17 Thread S . Çağlar Onur
On Fri, Jan 17, 2014 at 7:34 PM, Stéphane Graber wrote: > On Fri, Jan 17, 2014 at 07:27:03PM -0500, S.Çağlar Onur wrote: >> Hey Stéphane, >> >> On Fri, Jan 17, 2014 at 3:18 PM, Stéphane Graber wrote: >> > On Fri, Jan 17, 2014 at 03:01:46PM -0500, S.Çağlar Onur wrote: >> >> Return an error if the

[lxc-devel] [PATCH] handle unprivileged user calls more gracefully (v2)

2014-01-17 Thread S . Çağlar Onur
Return an error if the function is not supposed to be called by an unprivileged user. Otherwise those calls fail in the middle of their execution with different reasons. changes since v1: - am_unpriv is now a simple geteuid check, - API functions are now providing error messages, - lxc-info, lxc

Re: [lxc-devel] [PATCH] handle unprivileged user calls more gracefully

2014-01-17 Thread Stéphane Graber
On Fri, Jan 17, 2014 at 07:27:03PM -0500, S.Çağlar Onur wrote: > Hey Stéphane, > > On Fri, Jan 17, 2014 at 3:18 PM, Stéphane Graber wrote: > > On Fri, Jan 17, 2014 at 03:01:46PM -0500, S.Çağlar Onur wrote: > >> Return an error if the function is not supposed to be called by an > >> unprivileged

Re: [lxc-devel] [PATCH] handle unprivileged user calls more gracefully

2014-01-17 Thread S . Çağlar Onur
Hey Stéphane, On Fri, Jan 17, 2014 at 3:18 PM, Stéphane Graber wrote: > On Fri, Jan 17, 2014 at 03:01:46PM -0500, S.Çağlar Onur wrote: >> Return an error if the function is not supposed to be called by an >> unprivileged user. >> Otherwise those calls fail in the middle of their execution with d

[lxc-devel] [lxc/lxc] adade8: lxc-usernsexec: add a manpage

2014-01-17 Thread GitHub
Branch: refs/heads/master Home: https://github.com/lxc/lxc Commit: adade80c7e74c5185f63ff009116bf9d30c79876 https://github.com/lxc/lxc/commit/adade80c7e74c5185f63ff009116bf9d30c79876 Author: Serge Hallyn Date: 2014-01-17 (Fri, 17 Jan 2014) Changed paths: M configure.ac

Re: [lxc-devel] [PATCH 1/1] lxc-usernsexec: add a manpage

2014-01-17 Thread Stéphane Graber
On Fri, Jan 17, 2014 at 03:15:45PM -0600, Serge Hallyn wrote: > and fix the help output in the program > > Signed-off-by: Serge Hallyn Acked-by: Stéphane Graber > --- > configure.ac | 1 + > doc/Makefile.am| 1 + > doc/lxc-usernsexec.sgml.in | 156 >

Re: [lxc-devel] Containers do not start with lxc-1.0.0.beta2 on RHEL-6.5

2014-01-17 Thread Serge Hallyn
Quoting Robert Vogelgesang (vo...@users.sourceforge.net): > Hello all, > > since yesterday I'm testing lxc-1.0.0.beta2 on a RHEL-6.5, but I > failed to get any container to start. > > I've set up a RHEL-6.5 test server with the "cgconfig" service enabled > in default configuration. When I try to

[lxc-devel] [PATCH 1/1] lxc-usernsexec: add a manpage

2014-01-17 Thread Serge Hallyn
and fix the help output in the program Signed-off-by: Serge Hallyn --- configure.ac | 1 + doc/Makefile.am| 1 + doc/lxc-usernsexec.sgml.in | 156 + src/lxc/lxc_usernsexec.c | 3 +- 4 files changed, 159 insertions(+),

Re: [lxc-devel] [PATCH] handle unprivileged user calls more gracefully

2014-01-17 Thread Stéphane Graber
On Fri, Jan 17, 2014 at 03:01:46PM -0500, S.Çağlar Onur wrote: > Return an error if the function is not supposed to be called by an > unprivileged user. > Otherwise those calls fail in the middle of their execution with different > reasons. > > Signed-off-by: S.Çağlar Onur Hmm, so I have mixed

[lxc-devel] [PATCH] handle unprivileged user calls more gracefully

2014-01-17 Thread S . Çağlar Onur
Return an error if the function is not supposed to be called by an unprivileged user. Otherwise those calls fail in the middle of their execution with different reasons. Signed-off-by: S.Çağlar Onur --- src/lxc/lxccontainer.c | 33 - 1 file changed, 28 insertion

[lxc-devel] Containers do not start with lxc-1.0.0.beta2 on RHEL-6.5

2014-01-17 Thread Robert Vogelgesang
Hello all, since yesterday I'm testing lxc-1.0.0.beta2 on a RHEL-6.5, but I failed to get any container to start. I've set up a RHEL-6.5 test server with the "cgconfig" service enabled in default configuration. When I try to start a container (with root privileges), I get: # lxc-start -n test -

Re: [lxc-devel] [PATCH] exclude non-existing signals from the loop

2014-01-17 Thread Stéphane Graber
On Fri, Jan 17, 2014 at 12:17:55PM -0500, Michael H. Warfield wrote: > On Fri, 2014-01-17 at 08:24 -0600, Serge Hallyn wrote: > > Quoting Qiang Huang (h.huangqi...@huawei.com): > > > On 2014/1/17 5:38, Serge Hallyn wrote: > > > > Quoting S.Çağlar Onur (cag...@10ur.org): > > > >> On Thu, Jan 16, 20

Re: [lxc-devel] [PATCH] exclude non-existing signals from the loop

2014-01-17 Thread Michael H. Warfield
On Fri, 2014-01-17 at 08:24 -0600, Serge Hallyn wrote: > Quoting Qiang Huang (h.huangqi...@huawei.com): > > On 2014/1/17 5:38, Serge Hallyn wrote: > > > Quoting S.Çağlar Onur (cag...@10ur.org): > > >> On Thu, Jan 16, 2014 at 4:24 PM, Serge Hallyn > > >> wrote: > > >>> Quoting S.Çağlar Onur (cag.

Re: [lxc-devel] [PATCH] exclude non-existing signals from the loop

2014-01-17 Thread S . Çağlar Onur
On Fri, Jan 17, 2014 at 9:24 AM, Serge Hallyn wrote: > Quoting Qiang Huang (h.huangqi...@huawei.com): >> On 2014/1/17 5:38, Serge Hallyn wrote: >> > Quoting S.Çağlar Onur (cag...@10ur.org): >> >> On Thu, Jan 16, 2014 at 4:24 PM, Serge Hallyn >> >> wrote: >> >>> Quoting S.Çağlar Onur (cag...@10ur

[lxc-devel] [lxc/lxc] 348cb2: doc: Update Japanese lxc-ls(1) for -f and -F optio...

2014-01-17 Thread GitHub
Branch: refs/heads/master Home: https://github.com/lxc/lxc Commit: 348cb247dbb92940b5684c12b43579bccba85dab https://github.com/lxc/lxc/commit/348cb247dbb92940b5684c12b43579bccba85dab Author: KATOH Yasufumi Date: 2014-01-17 (Fri, 17 Jan 2014) Changed paths: M doc/ja/lxc-l

Re: [lxc-devel] [PATCH] doc: Update Japanese lxc-ls(1) for -f and -F option

2014-01-17 Thread Stéphane Graber
On Fri, Jan 17, 2014 at 05:12:14PM +0900, KATOH Yasufumi wrote: > Update for commit c5afb6e455d9ec00af9f3399836152eaf9d0a4f5 > > Signed-off-by: KATOH Yasufumi Acked-by: Stéphane Graber > --- > doc/ja/lxc-ls.sgml.in | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --gi

Re: [lxc-devel] [PATCH] exclude non-existing signals from the loop

2014-01-17 Thread Qiang Huang
On 2014年01月17日 22:24, Serge Hallyn wrote: > If we could know on any system which signals to bypass that'd be > fine, but AFAICS we can't. > > It sounds to me like we should simply ignore failure at sigaction like > we used to :) Something like below. Is that what you meant? > > From 87319b691c8

Re: [lxc-devel] [PATCH] exclude non-existing signals from the loop

2014-01-17 Thread Serge Hallyn
Quoting Qiang Huang (h.huangqi...@huawei.com): > On 2014/1/17 5:38, Serge Hallyn wrote: > > Quoting S.Çağlar Onur (cag...@10ur.org): > >> On Thu, Jan 16, 2014 at 4:24 PM, Serge Hallyn > >> wrote: > >>> Quoting S.Çağlar Onur (cag...@10ur.org): > 32 and 33 are not defined and causing sigaction

[lxc-devel] [PATCH] doc: Update Japanese lxc-ls(1) for -f and -F option

2014-01-17 Thread KATOH Yasufumi
Update for commit c5afb6e455d9ec00af9f3399836152eaf9d0a4f5 Signed-off-by: KATOH Yasufumi --- doc/ja/lxc-ls.sgml.in | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/ja/lxc-ls.sgml.in b/doc/ja/lxc-ls.sgml.in index 4bab189..3ca1e78 100644 --- a/doc/ja/lxc-ls.sgml.in +