[lxc-devel] [PATCH 2/2] introduce lxc-snapshot

2013-09-06 Thread Serge Hallyn
Hopefully someone else will come in and spruce it up :) This version is as simple as can be lxc-snapshot -n a1 create a snapshot of a1 echo "second commit" > /tmp/a lxc-snapshot -n a1 -c /tmp/a create a snapshot of a1 with /tmp/a as a commit comment lxc-snapshot -n a1 -L l

Re: [lxc-devel] [PATCH] API support for container snapshots

2013-09-06 Thread Stéphane Graber
On Fri, Sep 06, 2013 at 02:13:23PM -0500, Serge Hallyn wrote: > Quoting Stéphane Graber (stgra...@ubuntu.com): > > > +static struct lxc_container *lxcsnap_open(struct lxc_snapshot *s) > > > +{ > > > + return NULL; > > > +} > > > > I guess that's because we may want to do some more stuff in there l

[lxc-devel] [lxc/lxc] f756cd: configure: enable Lua if found and continue withou...

2013-09-06 Thread GitHub
Branch: refs/heads/staging Home: https://github.com/lxc/lxc Commit: f756cda05c4058dd7f5d46f2cf51c3bc7fd002d1 https://github.com/lxc/lxc/commit/f756cda05c4058dd7f5d46f2cf51c3bc7fd002d1 Author: Natanael Copa Date: 2013-09-06 (Fri, 06 Sep 2013) Changed paths: M configure.ac

Re: [lxc-devel] [PATCH] configure: enable Lua if found and continue without if not

2013-09-06 Thread Stéphane Graber
On Fri, Sep 06, 2013 at 09:09:57PM +0200, Natanael Copa wrote: > Search for Lua if no --enable-lua/--disable-lua specified but continue > without if not found. > > If --enable-lua is specified and Lua is not found then return error. > > If --disable-lua is specified, then don't search for Lua. >

[lxc-devel] [PATCH] API support for container snapshots

2013-09-06 Thread Serge Hallyn
I'll write a 'lxc-snapshot' program using this api next, but here is a first shot at the actual API functionality. See the comments in lxccontainer.h and the example usage in src/tests/snapshot.c for details. Signed-off-by: Serge Hallyn --- src/lxc/lxccontainer.c | 281 +

[lxc-devel] [PATCH 1/2] API support for container snapshots (v2)

2013-09-06 Thread Serge Hallyn
The api allows for creating, listing, and restoring of container snapshots. Snapshots are created as snapshot clones of the original container - i.e. btrfs and lvm will be done as snapshot, a directory-backed container will have overlayfs snapshots. A restore is a copy-clone, using the same backi

Re: [lxc-devel] LXC_DIRECTORY remounted read-only

2013-09-06 Thread Serge Hallyn
Uh. what the... lxc_spawn closes the pinfd right before returning success. This is a bug in commit 2b0e17e48f4f55ddfcde74d1f00932837fa2cfda Thanks for reporting it! -serge Quoting Harald Dunkel (ha...@afaics.de): > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > Hi Serge, > > On 08/26

Re: [lxc-devel] [PATCH] lxc_spawn: don't close pinfd until container is stopped

2013-09-06 Thread Stéphane Graber
On Fri, Sep 06, 2013 at 12:28:48PM -0500, Serge Hallyn wrote: > Otherwise containers may be able to remount -o ro their rootfs > at shutdown. > > Reported-by: Harald Dunkel > Signed-off-by: Serge Hallyn Acked-by: Stéphane Graber > --- > src/lxc/start.c | 14 +++--- > 1 file changed,

Re: [lxc-devel] RFC: Device Namespaces

2013-09-06 Thread Eric W. Biederman
Oren Laadan writes: > Hi Serge, > > > On Thu, Aug 22, 2013 at 2:21 PM, Serge Hallyn wrote: > >> Quoting Oren Laadan (or...@cellrox.com): >> > Hi everyone! >> > >> > We [1] have been working on bringing lightweight virtualization to >> > Linux-based mobile devices like Android (or other Linux-base

[lxc-devel] [PATCH] configure: enable Lua if found and continue without if not

2013-09-06 Thread Natanael Copa
Search for Lua if no --enable-lua/--disable-lua specified but continue without if not found. If --enable-lua is specified and Lua is not found then return error. If --disable-lua is specified, then don't search for Lua. Signed-off-by: Natanael Copa --- configure.ac | 40 +++

Re: [lxc-devel] [PATCH] API support for container snapshots

2013-09-06 Thread Serge Hallyn
Quoting Stéphane Graber (stgra...@ubuntu.com): > > +static struct lxc_container *lxcsnap_open(struct lxc_snapshot *s) > > +{ > > + return NULL; > > +} > > I guess that's because we may want to do some more stuff in there later > right? ^ That's what I was originally thinking, but I'm thinking I

Re: [lxc-devel] [PATCH] API support for container snapshots

2013-09-06 Thread Stéphane Graber
On Fri, Sep 06, 2013 at 11:11:06AM -0500, Serge Hallyn wrote: > I'll write a 'lxc-snapshot' program using this api next, but here is > a first shot at the actual API functionality. > > See the comments in lxccontainer.h and the example usage in > src/tests/snapshot.c for details. > > Signed-off-b

[lxc-devel] [lxc/lxc] 5c068d: lxc_spawn: don't close pinfd until container is st...

2013-09-06 Thread GitHub
Branch: refs/heads/staging Home: https://github.com/lxc/lxc Commit: 5c068da9695bcbfa46e0b3666128e3a533c9ddc7 https://github.com/lxc/lxc/commit/5c068da9695bcbfa46e0b3666128e3a533c9ddc7 Author: Serge Hallyn Date: 2013-09-06 (Fri, 06 Sep 2013) Changed paths: M src/lxc/start

[lxc-devel] [PATCH] lxc_spawn: don't close pinfd until container is stopped

2013-09-06 Thread Serge Hallyn
Otherwise containers may be able to remount -o ro their rootfs at shutdown. Reported-by: Harald Dunkel Signed-off-by: Serge Hallyn --- src/lxc/start.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/lxc/start.c b/src/lxc/start.c index 7ee67ec..e841bac 100

Re: [lxc-devel] [PATCH] lua: fix logic to enable lua support in configure

2013-09-06 Thread Stéphane Graber
On Fri, Sep 06, 2013 at 09:08:45AM +0200, Natanael Copa wrote: > When there is no --enable-lua or --with-lua-pc, Lua should not be > enabled. > > This fixes a bug introduced with 12e93188 (configure/makefile: > Allow specify Lua pkg-config file with --with-lua-pc) that caused > configure script to

[lxc-devel] [lxc/lxc] 69c757: lua: fix logic to enable lua support in configure

2013-09-06 Thread GitHub
Branch: refs/heads/staging Home: https://github.com/lxc/lxc Commit: 69c757b343b5bbd2543adc4f3f0204d4696515e0 https://github.com/lxc/lxc/commit/69c757b343b5bbd2543adc4f3f0204d4696515e0 Author: Natanael Copa Date: 2013-09-06 (Fri, 06 Sep 2013) Changed paths: M configure.ac

Re: [lxc-devel] [PATCH] lua: fix logic to enable lua support in configure

2013-09-06 Thread Natanael Copa
On Fri, 6 Sep 2013 10:56:09 +0200 Thomas Moschny wrote: > 2013/9/6 Natanael Copa : > > I wonder it it would be an idea to replace the 2 switches: > > > > --enable-lua > > --with-lua-pc[=PKG] > > > > with a single switch: > > > > --with-lua[=PKG] > > > > As it works now, if you specify eithe

Re: [lxc-devel] [PATCH] lua: fix logic to enable lua support in configure

2013-09-06 Thread Thomas Moschny
2013/9/6 Natanael Copa : > I wonder it it would be an idea to replace the 2 switches: > > --enable-lua > --with-lua-pc[=PKG] > > with a single switch: > > --with-lua[=PKG] > > As it works now, if you specify either --enable-lua or --with-lua-pc, > lua will be enabled and configure will fail i

[lxc-devel] [PATCH] lua: fix logic to enable lua support in configure

2013-09-06 Thread Natanael Copa
When there is no --enable-lua or --with-lua-pc, Lua should not be enabled. This fixes a bug introduced with 12e93188 (configure/makefile: Allow specify Lua pkg-config file with --with-lua-pc) that caused configure script to fail if lua headers was missing. Signed-off-by: Natanael Copa --- PS. I