[lxc-devel] [PATCH] Make lxc-start-ephemeral use lxc.ephemeral
Stéphane Graber
stgraber at ubuntu.com
Mon Oct 5 10:44:45 UTC 2015
On Wed, Sep 30, 2015 at 06:09:49PM +0000, Serge Hallyn wrote:
> Quoting Christian Brauner (christianvanbrauner at gmail.com):
> > While lxc-copy is under review let users benefit (reboot survival etc.) from the
> > new lxc.ephemeral option already in lxc-start-ephemeral. This way we can remove
> > the lxc.hook.post-stop script-
> >
> > Signed-off-by: Christian Brauner <christianvanbrauner at gmail.com>
> > ---
>
> I'll leave this for Stéphane to review, as I'm especially unfamiliar
> with the lxc-start-ephemeral code at this point.
Acked-by: Stéphane Graber <stgraber at ubuntu.com>
>
> > src/lxc/lxc-start-ephemeral.in | 10 +---------
> > 1 file changed, 1 insertion(+), 9 deletions(-)
> >
> > diff --git a/src/lxc/lxc-start-ephemeral.in b/src/lxc/lxc-start-ephemeral.in
> > index d2c3904..3b3405c 100644
> > --- a/src/lxc/lxc-start-ephemeral.in
> > +++ b/src/lxc/lxc-start-ephemeral.in
> > @@ -306,16 +306,8 @@ touch $LXC_DIR/configured
> > dest.set_config_item("lxc.hook.pre-mount",
> > os.path.join(dest_path, "pre-mount"))
> >
> > -# Generate post-stop script
> > if not args.keep_data:
> > - with open(os.path.join(dest_path, "post-stop"), "w+") as fd:
> > - os.fchmod(fd.fileno(), 0o755)
> > - fd.write("""#!/bin/sh
> > -[ -d "%s" ] && rm -Rf "%s"
> > -""" % (dest_path, dest_path))
> > -
> > - dest.set_config_item("lxc.hook.post-stop",
> > - os.path.join(dest_path, "post-stop"))
> > + dest.set_config_item("lxc.ephemeral", "1")
> >
> > dest.save_config()
> >
> > --
> > 2.6.0
> >
> > _______________________________________________
> > lxc-devel mailing list
> > lxc-devel at lists.linuxcontainers.org
> > http://lists.linuxcontainers.org/listinfo/lxc-devel
> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel
--
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20151005/adda2011/attachment.sig>
More information about the lxc-devel
mailing list