[lxc-devel] lxc-autostart shutdown always all containers

Stéphane Graber stgraber at ubuntu.com
Fri Mar 7 00:17:08 UTC 2014


On Fri, Mar 07, 2014 at 01:04:21AM +0100, Gianluigi Tiesi wrote:
> Hi,
> 
> I think lxc-autostart should consider all running containers for
> shutdown (maybe even for reboot?), not only the ones with
> lxc.start.auto = 1
> otherwise manually started containers will be killed without proper shutdown
> 
> something like:
>         if (!my_args.shutdown && get_config_integer(c,
> "lxc.start.auto") != 1) {
>             lxc_container_put(c);
>             continue;
>         }
> 
> instead of:
>         if (get_config_integer(c, "lxc.start.auto") != 1) {
>             lxc_container_put(c);
>             continue;
>         }
> 
> Regards

No, this should be added as a separate -A filter or something along
those lines and certainly not done by default (though indeed, init
scripts should pass -A on shutdown).

You seem to be assuming that autostart is only used at system
start/stop, that's pretty far from the case. The whole idea behind
lxc.group is for people to be able to start/stop group of containers as
needed.

-- 
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/20140306/4a0b91e4/attachment.pgp>


More information about the lxc-devel mailing list