[Lxc-users] start order
Serge Hallyn
serge.hallyn at canonical.com
Tue Dec 11 22:28:21 UTC 2012
Quoting Jäkel, Guido (G.Jaekel at dnb.de):
> Hi all,
>
> here my 5ct on auto start and start order: Because i'm using a farm of LXC
> hosts where my containers may be spread over, i also need to persist the
> "preferred host" of a container. This is currently stored in a separate
> configuration file. Because this information should be easy accessible by the
> Container also for some special reasons, it is stored in the containers root
> file system.
>
> If a LXC host boots, it will scan for this information and start it's
> "assigned" containers -- but only if they are not already started on other
Yeah I think this is something to keep custom. Remember any lines not
starting with 'lxc.' in the container config, so you can add information
there for your own scripts (perhaps not relevant since you say you need
it in the container rootfs anyway).
> non-preferred hosts by failover mechanisms. This is detected by some
> heuristic inspections like a ping to the containers management network
> address. For sure a LXC host farm is an advanced feature, but in this case
> for an lxc-internal autostart feature one need a hook script to control if an
> autostart-tagged container should really be started.
>
>
> For a start order configuration mechanism I would prefer some kind of a local
> "before/after" paradigm over a concrete and total enumeration: Within the lxc
> configuration of a container A it should be mentioned that it depends on B
> (should be started "after B") and/or provide something for C (should be
Right, that's why I specifically mentioned dependencies.
On the other hand, I *do* also feel that any services on the containers
ought to be robust to unavailability, so that startup order should not
matter.
-serge
More information about the lxc-users
mailing list