Re: [lxc-devel] (Mount) namespaces cleanup

2015-09-08 Thread Wolfgang Bumiller
> On September 7, 2015 at 5:44 PM Serge Hallyn wrote: > Quoting Wolfgang Bumiller (w.bumil...@proxmox.com): > > On Fri, Sep 04, 2015 at 06:09:36PM +, Serge Hallyn wrote: > > > > I'm assuming the cleanup is left to the kernel for when the last > > > > reference to

Re: [lxc-devel] [PATCH 4/4] Enable lxc_fini() to destroy container on shutdown

2015-09-08 Thread Serge Hallyn
Quoting Christian Brauner (christianvanbrau...@gmail.com): > When lxc.ephemeral is set to 1 in the containers config it will be destroyed > on > shutdown. > > Signed-off-by: Christian Brauner Acked-by: Serge E. Hallyn > --- >

Re: [lxc-devel] [PATCH 3/4] Destroy bdevs using bdev_destroy() from bdev.h

2015-09-08 Thread Serge Hallyn
Quoting Christian Brauner (christianvanbrau...@gmail.com): > Signed-off-by: Christian Brauner > --- > src/lxc/lxccontainer.c | 60 > ++ > 1 file changed, 17 insertions(+), 43 deletions(-) > > diff --git

Re: [lxc-devel] [PATCH 2/4] Add bdev_destroy() and bdev_destroy_wrapper()

2015-09-08 Thread Christian Brauner
Yes, missed this. Updated patch follows after you reviewed the rest. On Sep 8, 2015 9:19 PM, "Serge Hallyn" wrote: > Quoting Christian Brauner (christianvanbrau...@gmail.com): > > static do_bdev_destroy() and bdev_destroy_wrapper() from lxccontainer.c > become > > public

Re: [lxc-devel] [PATCH 1/4] Add lxc.ephemeral lxc.ephemeral indicates whether a container will be destroyed on shutdown Can be 0 for non-ephemeral and 1 for ephemeral.

2015-09-08 Thread Serge Hallyn
Quoting Christian Brauner (christianvanbrau...@gmail.com): > Signed-off-by: Christian Brauner Acked-by: Serge E. Hallyn > --- > src/lxc/conf.h| 3 +++ > src/lxc/confile.c | 20 > 2 files changed, 23

[lxc-devel] [PATCH 4/4] Enable lxc_fini() to destroy container on shutdown

2015-09-08 Thread Christian Brauner
When lxc.ephemeral is set to 1 in the containers config it will be destroyed on shutdown. Signed-off-by: Christian Brauner --- src/lxc/start.c | 58 + 1 file changed, 58 insertions(+) diff --git

[lxc-devel] [PATCH 2/4] Add bdev_destroy() and bdev_destroy_wrapper()

2015-09-08 Thread Christian Brauner
static do_bdev_destroy() and bdev_destroy_wrapper() from lxccontainer.c become public bdev_destroy() and bdev_destroy_wrapper() in bdev.c and bdev.h Signed-off-by: Christian Brauner --- src/lxc/bdev.c | 37 + src/lxc/bdev.h | 3

[lxc-devel] Add lxc.ephemeral to destroy container on shutdown (v3)

2015-09-08 Thread Christian Brauner
These patches add the ability to destroy a container on shutdown when lxc.ephemeral = 1 is set in the containers config file. Tested with privileged and unprivileged btrfs-, overlayfs-, and aufs- containers on Ubuntu Wily 15.04. Christian Brauner (4): Add lxc.ephemeral lxc.ephemeral

[lxc-devel] [PATCH 1/4] Add lxc.ephemeral lxc.ephemeral indicates whether a container will be destroyed on shutdown Can be 0 for non-ephemeral and 1 for ephemeral.

2015-09-08 Thread Christian Brauner
Signed-off-by: Christian Brauner --- src/lxc/conf.h| 3 +++ src/lxc/confile.c | 20 2 files changed, 23 insertions(+) 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 @@

[lxc-devel] [PATCH 3/4] Destroy bdevs using bdev_destroy() from bdev.h

2015-09-08 Thread Christian Brauner
Signed-off-by: Christian Brauner --- src/lxc/lxccontainer.c | 62 -- 1 file changed, 19 insertions(+), 43 deletions(-) diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index fb99892..0eaf98e 100644 ---

Re: [lxc-devel] [PATCH] Do not use strlen() on non-null terminated buffer

2015-09-08 Thread Serge Hallyn
Quoting Christian Brauner (christianvanbrau...@gmail.com): > Signed-off-by: Christian Brauner Thanks, Christian. Acked-by: Serge E. Hallyn > --- > src/lxc/lxccontainer.c | 31 +-- > 1 file changed, 17

Re: [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-08 Thread Christian Brauner
On Mon, Sep 07, 2015 at 05:05:47PM +, Serge Hallyn wrote: > Quoting Christian Brauner (christianvanbrau...@gmail.com): > > Signed-off-by: Christian Brauner > > > > 100.0% src/lxc/ > > diff --git a/src/lxc/bdev.c b/src/lxc/bdev.c > > index ada3958..475d878

[lxc-devel] [lxc/lxc] f08fee: Do not use strlen() on non-null terminated buffer

2015-09-08 Thread GitHub
Branch: refs/heads/master Home: https://github.com/lxc/lxc Commit: f08fee55a1f0ca62c2c97a2d2fd5ef1d7fbae8ee https://github.com/lxc/lxc/commit/f08fee55a1f0ca62c2c97a2d2fd5ef1d7fbae8ee Author: Christian Brauner Date: 2015-09-08 (Tue, 08 Sep 2015)

[lxc-devel] [PATCH] Add tests for snapshot clone dependencies

2015-09-08 Thread Serge Hallyn
Test edge cases (removing first and last entries in lxc_snapshots and the very last snapshot) and make sure original container isn't destroyed while there are snapshots, and is when there are none. Signed-off-by: Serge Hallyn --- src/tests/Makefile.am | 2 ++

Re: [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-08 Thread Christian Brauner
On Mon, Sep 07, 2015 at 04:54:26PM +, Serge Hallyn wrote: > Quoting Christian Brauner (christianvanbrau...@gmail.com): > > Signed-off-by: Christian Brauner > > Acked-by: Serge E. Hallyn > > Though I suspect it's worth changing the

Re: [lxc-devel] (Mount) namespaces cleanup

2015-09-08 Thread Serge Hallyn
Quoting Wolfgang Bumiller (w.bumil...@proxmox.com): > > > > On September 7, 2015 at 5:44 PM Serge Hallyn > > wrote: > > Quoting Wolfgang Bumiller (w.bumil...@proxmox.com): > > > On Fri, Sep 04, 2015 at 06:09:36PM +, Serge Hallyn wrote: > > > > > I'm assuming the

[lxc-devel] [PATCH 0/4] Add lxc.ephemeral to destroy container on shutdown (v2)

2015-09-08 Thread Christian Brauner
These patches add the ability to destroy a container on shutdown when lxc.ephemeral = 1 is set in the containers config file. Tested with privileged and unprivileged btrfs-, overlayfs-, and aufs- containers on Ubuntu Wily 15.04. Christian Brauner (4): Add lxc.ephemeral lxc.ephemeral

[lxc-devel] [PATCH 1/4] Add lxc.ephemeral lxc.ephemeral indicates whether a container will be destroyed on shutdown Can be 0 for non-ephemeral and 1 for ephemeral.

2015-09-08 Thread Christian Brauner
Signed-off-by: Christian Brauner --- src/lxc/conf.h| 3 +++ src/lxc/confile.c | 20 2 files changed, 23 insertions(+) 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 @@

[lxc-devel] [PATCH 2/4] Add bdev_destroy() and bdev_destroy_wrapper()

2015-09-08 Thread Christian Brauner
static do_bdev_destroy() and bdev_destroy_wrapper() from lxccontainer.c become public bdev_destroy() and bdev_destroy_wrapper() in bdev.c and bdev.h Signed-off-by: Christian Brauner --- src/lxc/bdev.c | 39 +++ src/lxc/bdev.h |

[lxc-devel] [PATCH 3/4] Destroy bdevs using bdev_destroy() from bdev.h

2015-09-08 Thread Christian Brauner
Signed-off-by: Christian Brauner --- src/lxc/lxccontainer.c | 60 ++ 1 file changed, 17 insertions(+), 43 deletions(-) diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index fb99892..6cc3b08 100644 ---

[lxc-devel] [PATCH 4/4] Enable lxc_fini() to destroy container on shutdown

2015-09-08 Thread Christian Brauner
When lxc.ephemeral is set to 1 in the containers config it will be destroyed on shutdown. Signed-off-by: Christian Brauner --- src/lxc/start.c | 58 + 1 file changed, 58 insertions(+) diff --git