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

Christian Brauner christianvanbrauner at gmail.com
Tue Sep 8 18:12:40 UTC 2015


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 indicates whether a container will
    be destroyed on shutdown     Can be 0 for non-ephemeral and 1 for
    ephemeral.
  Add bdev_destroy() and bdev_destroy_wrapper()
  Destroy bdevs using bdev_destroy() from bdev.h
  Enable lxc_fini() to destroy container on shutdown

 src/lxc/bdev.c         | 39 ++++++++++++++++++++++++++++++++
 src/lxc/bdev.h         |  3 +++
 src/lxc/conf.h         |  3 +++
 src/lxc/confile.c      | 20 +++++++++++++++++
 src/lxc/lxccontainer.c | 60 ++++++++++++++------------------------------------
 src/lxc/start.c        | 58 ++++++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 140 insertions(+), 43 deletions(-)

-- 
2.5.1



More information about the lxc-devel mailing list