[lxc-devel] Container autostart proposal V2

Stéphane Graber stgraber at ubuntu.com
Thu May 30 13:33:07 UTC 2013


On 05/30/2013 02:35 AM, Harald Dunkel wrote:
> Hi folks,
> 
> 
> If its not too late for a suggestion:
> 
> lxc-stop could provide an option -A to shutdown/stop all
> containers, independent from their autostart flag. Worst
> case scenario (almost) is that a disk has an IO error and
> the config files cannot be read anymore.

That's already covered by my proposal and I believe covered in the use
cases listed within it.

"lxc-stop -g any"

That'll stop all containers that are in the "any" group. "any" is
documented as being a special group that contains all containers even if
they have lxc.group set.

As you're not passing the "-a" flag, then the stop command will affect
all containers even if lxc.start.auto is 0.

> For my own part, if I want to stop the LXC server, then I
> don't care whether the containers were started manually or
> automatically. They have to stop asap to allow to unmount
> the partitions.

Indeed and that's specifically why I added the "any" group to my proposal.


> And one question:
> 
> Do lxc-start -a ... and lxc-stop -a ... start/stop all LXC
> containers in parallel, if their order and group are the
> same? I am concerned about accumulating timeouts or delays
> at shutdown or startup time of the host.

The usual STOPPED => RUNNING or RUNNING => STOPPED time is < 1s, so no,
we'll be doing that in serial order, but you won't really notice it
because of how quick it's.

That's assuming lxc.start.delay isn't set. If it's set, then obviously
startup will take longer because we'll wait of lxc.start.delay before
starting the next container (parallelizing would make the whole
priority/delay idea completely pointless obviously).

> Many thanx
> Harri


-- 
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: 901 bytes
Desc: OpenPGP digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20130530/d80f1556/attachment.pgp>


More information about the lxc-devel mailing list