Re: [lxc-devel] lxc-clone rewrite

2015-09-06 Thread Christian Brauner
These commits enable a container to be destroyed on shutdown by setting lxc.ephemeral = 1 in its configuration file. This will allow us a consistent implementation of lxc-copy = lxc-clone + lxc-start-ephemeral without having to resort to hacks. Small changes: lxc_delete_string_in_array() has

[lxc-devel] [PATCH 1/6] Add lxc.ephemeral lxc.ephemeral indicates whether a container will be destroyed on shutdown Any integer value > 0 can be used to indicate that a container is ephemeral.

2015-09-06 Thread Christian Brauner
Signed-off-by: Christian Brauner 100.0% src/lxc/ diff --git a/src/lxc/conf.h b/src/lxc/conf.h index dc5328a..5aebd91 100644 --- a/src/lxc/conf.h +++ b/src/lxc/conf.h @@ -370,6 +370,9 @@ struct lxc_conf { * should run under when using lxc-execute */

[lxc-devel] [PATCH 4/6] Add bdev_destroy() to bdev.c and bdev.h static do_bdev_destroy() in lxccontainer.c becomes public bdev_destroy()

2015-09-06 Thread Christian Brauner
Signed-off-by: Christian Brauner 100.0% src/lxc/ diff --git a/src/lxc/bdev.c b/src/lxc/bdev.c index ada3958..475d878 100644 --- a/src/lxc/bdev.c +++ b/src/lxc/bdev.c @@ -3614,3 +3614,21 @@ bool rootfs_is_blockdev(struct lxc_conf *conf) return true;

[lxc-devel] [PATCH 5/6] Destroy bdevs using new bdev_destroy() from bdev.h

2015-09-06 Thread Christian Brauner
Signed-off-by: Christian Brauner 100.0% src/lxc/ diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index 2103437..9f22fdc 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -2213,21 +2213,6 @@ static int lxc_rmdir_onedev_wrapper(void

[lxc-devel] [PATCH 6/6] Enable lxc_fini() to destroy container on shutdown This works for any bdev-type but is only used for overlayfs and aufs now

2015-09-06 Thread Christian Brauner
Now we can e.g. implement ephemeral containers in a consistent way. Signed-off-by: Christian Brauner 100.0% src/lxc/ diff --git a/src/lxc/start.c b/src/lxc/start.c index ffb8d12..1179d2c 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -83,6 +83,11 @@ const

Re: [lxc-devel] [PATCH 6/6] Enable lxc_fini() to destroy container on shutdown This works for any bdev-type but is only used for overlayfs and aufs now

2015-09-06 Thread Christian Brauner
Fixes for the return value checks. On Sun, Sep 06, 2015 at 10:38:21AM +0200, Christian Brauner wrote: > Now we can e.g. implement ephemeral containers in a consistent way. > > Signed-off-by: Christian Brauner > > 100.0% src/lxc/ > diff --git a/src/lxc/start.c

[lxc-devel] conf.c:instantiate_veth() rewrite

2015-09-06 Thread Stephane Nguyen
Hi It looks like conf.c:instanciate_veth() was rewritten; the result is that lxc-start is failing when setting up the veth pair MTUs. I rewrote a very small section of the code and it seems to be working fine now: 1) Move the following block (unchanged) before the block that's getting/setting