Re: [lxc-devel] regression: lxc-start -d hangs in lxc_monitor_sock_name (at process_lock)

2013-09-12 Thread Dwight Engen
On Thu, 12 Sep 2013 00:27:04 -0400 Stéphane Graber wrote: > Hello, > > It looks like Dwight's last change introduce a bit of a regression > when running lxc-start -d. Yikes, sorry I didn't catch that in my testing. My follow on patch for doing the monitor socket in the abstract space gets rid o

Re: [lxc-devel] [PATCH] hash lxcname for use in monitor unix socket sun_path[108]

2013-09-12 Thread Serge Hallyn
Quoting Dwight Engen (dwight.en...@oracle.com): > - Also convert to unix abstract socket > - A simple FNV hash is used instead of SHA-1 since we may not HAVE_GNUTLS > > Signed-off-by: Dwight Engen Acked-by: Serge E. Hallyn Thanks Dwight! Works great. > --- > src/lxc/monitor.c | 60 > ++

Re: [lxc-devel] regression: lxc-start -d hangs in lxc_monitor_sock_name (at process_lock)

2013-09-12 Thread Serge Hallyn
Quoting Dwight Engen (dwight.en...@oracle.com): > On Thu, 12 Sep 2013 00:27:04 -0400 > Stéphane Graber wrote: > > > Hello, > > > > It looks like Dwight's last change introduce a bit of a regression > > when running lxc-start -d. > > Yikes, sorry I didn't catch that in my testing. My follow on p

Re: [lxc-devel] [PATCH] cgroup: re-introduce ns cgroup support

2013-09-12 Thread Christian Seiler
Hi Serge, >> cgroups and have a separate function for the ns cgroup entries? Then > > Makes perfect sense to me to do so, yes. Since you didn't respond and I was in the mood to finish it, I assumed that you'd be OK with that, see my other set of patches for automatic cgroup mounting. -- Christia

[lxc-devel] [PATCH] Update .gitignore

2013-09-12 Thread S . Çağlar Onur
Signed-off-by: S.Çağlar Onur --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 8cecb72..660756f 100644 --- a/.gitignore +++ b/.gitignore @@ -59,6 +59,7 @@ src/lxc/lxc-netstat src/lxc/lxc-ps src/lxc/lxc-restart src/lxc/lxc-shutdown +src/lxc/lxc-sna

Re: [lxc-devel] [PATCH] cgroup: re-introduce ns cgroup support

2013-09-12 Thread Serge Hallyn
Quoting Christian Seiler (christ...@iwakd.de): > Hi again, > > I was just looking at how to best implement the cgroup mount hook. > Problem now is that the easiest way would be just to create the cgroup > before the clone() (enter is done afterwards anyway) so that the client > has access to handl

[lxc-devel] [RFC] rootfs pinning

2013-09-12 Thread Christian Seiler
Hi there, just a quick question: currently, rootfs is pinned with a .hold file in the parent directory (which btw. does not help against file systems that are already mounted on the host but directly in the rootfs directory). The problem with the .hold file is that it doesn't make the directory ne

Re: [lxc-devel] [RFC] rootfs pinning

2013-09-12 Thread Serge Hallyn
Quoting Christian Seiler (christ...@iwakd.de): > Hi there, > > just a quick question: currently, rootfs is pinned with a .hold file in > the parent directory (which btw. does not help against file systems that > are already mounted on the host but directly in the rootfs directory). > The problem w

Re: [lxc-devel] [RFC] rootfs pinning

2013-09-12 Thread Stéphane Graber
On Thu, Sep 12, 2013 at 08:27:07PM +0200, Christian Seiler wrote: > Hi there, > > just a quick question: currently, rootfs is pinned with a .hold file in > the parent directory (which btw. does not help against file systems that > are already mounted on the host but directly in the rootfs director

Re: [lxc-devel] [PATCH 2/4] cgroup: Split legacy 'ns' cgroup handling off from main cgroup handling

2013-09-12 Thread Serge Hallyn
Quoting Christian Seiler (christ...@iwakd.de): > This patch splits off ns legacy cgroup handling from main cgroup > handling. It moves the creation of the cgroups before clone(), so that > the child will easily know which cgroups it will later belong to. Since > this is not possible for the renamin

Re: [lxc-devel] [PATCH 3/4] cgroup: Add lxc_setup_mount_cgroup to setup /sys/fs/cgroup inside the container

2013-09-12 Thread Serge Hallyn
Quoting Christian Seiler (christ...@iwakd.de): > Add funbction to mount cgroup filesystem hierarchy into the container, > allowing only access to the parts that the container should have access > to, but none else. > > Signed-off-by: Christian Seiler Hm, these last two patches aren't working for

[lxc-devel] [lxc/lxc] 4bee03: Update .gitignore

2013-09-12 Thread GitHub
Branch: refs/heads/staging Home: https://github.com/lxc/lxc Commit: 4bee03bc9df2c2437f068f284327aff337cbdaa9 https://github.com/lxc/lxc/commit/4bee03bc9df2c2437f068f284327aff337cbdaa9 Author: S.Çağlar Onur Date: 2013-09-12 (Thu, 12 Sep 2013) Changed paths: M .gitignore

Re: [lxc-devel] [PATCH 3/4] cgroup: Add lxc_setup_mount_cgroup to setup /sys/fs/cgroup inside the container

2013-09-12 Thread Christian Seiler
Hi Serge, >> I could get behind the following: >> >>proc- always read-write (no harm AFAICT) >>sys - default: read-only >>sys:rw - read-write >>sys:ro - explicit read-only >>cgroup:ro - completely ro (including paths) >>cgroup

Re: [lxc-devel] [PATCH] Change rootfs pinning mechnism

2013-09-12 Thread Serge Hallyn
Quoting Christian Seiler (christ...@iwakd.de): > Chane pinning mechanism: Use $rootfs/lxc.hold instead of $rootfs.hold > (in case $rootfs is a mountpoint itself), but delete the file > immediately after creating it (but keep it open). This will keep the > root filesystem busy but does not leave any

[lxc-devel] [lxc/lxc] 368bbc: Support for automatic mounting of filesystems

2013-09-12 Thread GitHub
Branch: refs/heads/staging Home: https://github.com/lxc/lxc Commit: 368bbc02ba132cd978141f392e610adf3b9dcec8 https://github.com/lxc/lxc/commit/368bbc02ba132cd978141f392e610adf3b9dcec8 Author: Christian Seiler Date: 2013-09-12 (Thu, 12 Sep 2013) Changed paths: M src/lxc/c

Re: [lxc-devel] [PATCH 1/1] snapshots: add man page and fix up help info a bit.

2013-09-12 Thread Stéphane Graber
On Thu, Sep 12, 2013 at 03:08:26PM -0500, Serge Hallyn wrote: Awesome, I noticed it was missing when going through lintian output this morning and added it to my TODO for later this cycle, glad I won't have to do it myself then :) Acked-by: Stéphane Graber > Signed-off-by: Serge Hallyn > --- >

Re: [lxc-devel] [PATCH] Update .gitignore

2013-09-12 Thread Serge Hallyn
Quoting S.Çağlar Onur (cag...@10ur.org): > Signed-off-by: S.Çağlar Onur Acked-by: Serge E. Hallyn applying, thanks. > --- > .gitignore | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/.gitignore b/.gitignore > index 8cecb72..660756f 100644 > --- a/.gitignore > +++ b/.gitignore > @@ -

Re: [lxc-devel] regression: lxc-start -d hangs in lxc_monitor_sock_name (at process_lock)

2013-09-12 Thread S . Çağlar Onur
Hi, I think staging (my head is @ 813a48...) started to stuck while creating containers concurrently after monitoring related changes. I observed that issue with the Go bindings first. Then I wrote a test case to remove Go from the picture and I also thought that having a test case would be helpf

Re: [lxc-devel] [Lxc-users] Working LXC templates? EUREAKA! I think I've got it!

2013-09-12 Thread Michael H. Warfield
All - Especially Tony Su, Couple of people where I work thought you couldn't do what I was trying to do, that it was "impossible". Oh well. Looks like they were wrong. :-P It may not be "efficient" but it can be made to work. Way down below, in-line... On Mon, 2013-09-09 at 07:28 -0400, Mich

[lxc-devel] [lxc/lxc] b336d7: ignore ability to init /lxc-monitord.log

2013-09-12 Thread GitHub
Branch: refs/heads/staging Home: https://github.com/lxc/lxc Commit: b336d7246a324e8973bc449cb35db40b1627be47 https://github.com/lxc/lxc/commit/b336d7246a324e8973bc449cb35db40b1627be47 Author: Serge Hallyn Date: 2013-09-12 (Thu, 12 Sep 2013) Changed paths: M src/lxc/lxc_m

Re: [lxc-devel] [PATCH 3/4] cgroup: Add lxc_setup_mount_cgroup to setup /sys/fs/cgroup inside the container

2013-09-12 Thread Serge Hallyn
Quoting Christian Seiler (christ...@iwakd.de): > Add funbction to mount cgroup filesystem hierarchy into the container, > allowing only access to the parts that the container should have access > to, but none else. > > Signed-off-by: Christian Seiler Acked-by: Serge E. Hallyn This looks good t

Re: [lxc-devel] [PATCH 3/4] cgroup: Add lxc_setup_mount_cgroup to setup /sys/fs/cgroup inside the container

2013-09-12 Thread Christian Seiler
Hi Serge, >> Would you agree? > > Yup, sounds good. This email should probably be cut-pasted into the > lxc.conf man page then :) > > Should I apply the patch 4/4 as it stands now and the rest can be a > separate patch? > > Oh, one other thing is lxc.mount.auto needs to be added to > write_con

Re: [lxc-devel] [PATCH] tests: Introduce lxc-test-concurrent for testing basic actions concurrently

2013-09-12 Thread Serge Hallyn
Quoting S.Çağlar Onur (cag...@10ur.org): > Signed-off-by: S.Çağlar Onur Oh, great, thanks :) Acked-by: Serge E. Hallyn > --- > .gitignore | 3 ++ > src/tests/Makefile.am | 6 ++- > src/tests/concurrent.c | 116 > + > 3 files ch

Re: [lxc-devel] [PATCH 1/4] utils: Add lxc_append_paths to join two paths.

2013-09-12 Thread Serge Hallyn
Quoting Christian Seiler (christ...@iwakd.de): > Signed-off-by: Christian Seiler Acked-by: Serge E. Hallyn > --- > src/lxc/utils.c | 19 +++ > src/lxc/utils.h |1 + > 2 files changed, 20 insertions(+) > > diff --git a/src/lxc/utils.c b/src/lxc/utils.c > index 2e66585..78

Re: [lxc-devel] [PATCH 3/4] cgroup: Add lxc_setup_mount_cgroup to setup /sys/fs/cgroup inside the container

2013-09-12 Thread Serge Hallyn
Quoting Christian Seiler (christ...@iwakd.de): > Hi Serge, > > >> Would you agree? > > > > Yup, sounds good. This email should probably be cut-pasted into the > > lxc.conf man page then :) > > > > Should I apply the patch 4/4 as it stands now and the rest can be a > > separate patch? > > > > O

[lxc-devel] [lxc/lxc] f209d6: tests: Introduce lxc-test-concurrent for testing b...

2013-09-12 Thread GitHub
Branch: refs/heads/staging Home: https://github.com/lxc/lxc Commit: f209d63a97a8a2df5324608fee7b0d7a494d69eb https://github.com/lxc/lxc/commit/f209d63a97a8a2df5324608fee7b0d7a494d69eb Author: S.Çağlar Onur Date: 2013-09-12 (Thu, 12 Sep 2013) Changed paths: M .gitignore

[lxc-devel] [PATCH 1/1] snapshots: add man page and fix up help info a bit.

2013-09-12 Thread Serge Hallyn
Signed-off-by: Serge Hallyn --- configure.ac | 1 + doc/Makefile.am | 1 + doc/lxc-snapshot.sgml.in | 152 +++ src/lxc/lxc_snapshot.c | 7 ++- 4 files changed, 158 insertions(+), 3 deletions(-) create mode 100644 doc/lxc-sn

[lxc-devel] [PATCH] Change rootfs pinning mechnism

2013-09-12 Thread Christian Seiler
Chane pinning mechanism: Use $rootfs/lxc.hold instead of $rootfs.hold (in case $rootfs is a mountpoint itself), but delete the file immediately after creating it (but keep it open). This will keep the root filesystem busy but does not leave any unnecessary files lying around. Signed-off-by: Christ

Re: [lxc-devel] [PATCH 3/4] cgroup: Add lxc_setup_mount_cgroup to setup /sys/fs/cgroup inside the container

2013-09-12 Thread Serge Hallyn
Quoting Christian Seiler (christ...@iwakd.de): > Hi Serge, > > > Ah, no, mountall just gets upset about some forced readonly > > mounts. lxc.mount.auto = proc always worked for me. If I do > > > > - r = mount("sysfs", path, "sysfs", MS_RDONLY, NULL); > > + r = mount(

Re: [lxc-devel] [PATCH 3/4] cgroup: Add lxc_setup_mount_cgroup to setup /sys/fs/cgroup inside the container

2013-09-12 Thread Serge Hallyn
Quoting Christian Seiler (christ...@iwakd.de): > Hi Serge, > > >> I could get behind the following: > >> > >>proc- always read-write (no harm AFAICT) > >>sys - default: read-only > >>sys:rw - read-write > >>sys:ro - explicit read-only > >>

Re: [lxc-devel] regression: lxc-start -d hangs in lxc_monitor_sock_name (at process_lock)

2013-09-12 Thread Serge Hallyn
Thanks. A few days ago I wrote a short-n-simple little program that cloned two thread which each did some things with containers. It was definately racy. Based on your input I"ll take a closer look at the new monitoring code. I'm hoping to take a much closer look next week. I.e. load two conta

Re: [lxc-devel] [PATCH 3/4] cgroup: Add lxc_setup_mount_cgroup to setup /sys/fs/cgroup inside the container

2013-09-12 Thread Christian Seiler
Hi Serge, Am 12.09.2013 16:43, schrieb Serge Hallyn: > Quoting Christian Seiler (christ...@iwakd.de): >> Add funbction to mount cgroup filesystem hierarchy into the >> container, >> allowing only access to the parts that the container should have >> access >> to, but none else. >> >> Signed-off-

[lxc-devel] [PATCH] tests: Introduce lxc-test-concurrent for testing basic actions concurrently

2013-09-12 Thread S . Çağlar Onur
Signed-off-by: S.Çağlar Onur --- .gitignore | 3 ++ src/tests/Makefile.am | 6 ++- src/tests/concurrent.c | 116 + 3 files changed, 123 insertions(+), 2 deletions(-) create mode 100644 src/tests/concurrent.c diff --git a/.gitignor

Re: [lxc-devel] [PATCH 3/4] cgroup: Add lxc_setup_mount_cgroup to setup /sys/fs/cgroup inside the container

2013-09-12 Thread Serge Hallyn
Quoting Christian Seiler (christ...@iwakd.de): > Hi Serge, > > Am 12.09.2013 16:43, schrieb Serge Hallyn: > >Quoting Christian Seiler (christ...@iwakd.de): > >>Add funbction to mount cgroup filesystem hierarchy into the > >>container, > >>allowing only access to the parts that the container should

Re: [lxc-devel] [PATCH 3/4] cgroup: Add lxc_setup_mount_cgroup to setup /sys/fs/cgroup inside the container

2013-09-12 Thread Christian Seiler
Hi Serge, > Ah, no, mountall just gets upset about some forced readonly > mounts. lxc.mount.auto = proc always worked for me. If I do > > - r = mount("sysfs", path, "sysfs", MS_RDONLY, NULL); > + r = mount("sysfs", path, "sysfs", 0, NULL); > - mount(NULL, path,

[lxc-devel] [lxc/lxc] b45c70: hash lxcname for use in monitor unix socket sun_pa...

2013-09-12 Thread GitHub
Branch: refs/heads/staging Home: https://github.com/lxc/lxc Commit: b45c701178cdc705d26c95f31035c39bab9edf20 https://github.com/lxc/lxc/commit/b45c701178cdc705d26c95f31035c39bab9edf20 Author: Dwight Engen Date: 2013-09-12 (Thu, 12 Sep 2013) Changed paths: M src/lxc/monit

[lxc-devel] [lxc/lxc] 813a48: snapshots: add man page and fix up help info a bit...

2013-09-12 Thread GitHub
Branch: refs/heads/staging Home: https://github.com/lxc/lxc Commit: 813a4837659d5d7a2c0d0abe03c87196747217e9 https://github.com/lxc/lxc/commit/813a4837659d5d7a2c0d0abe03c87196747217e9 Author: Serge Hallyn Date: 2013-09-12 (Thu, 12 Sep 2013) Changed paths: M configure.ac

Re: [lxc-devel] [Lxc-users] Working LXC templates? EUREAKA! I think I've got it!

2013-09-12 Thread Michael H. Warfield
On Thu, 2013-09-12 at 15:23 -0400, Michael H. Warfield wrote: > All - Especially Tony Su, > Couple of people where I work thought you couldn't do what I was trying > to do, that it was "impossible". Oh well. Looks like they were > wrong. :-P It may not be "efficient" but it can be made to wor