Now that LXD has the READY-event we might be able to implement container startup-dependencies based on that.
We already have:
-
boot.autostart
to force startup on boot -
boot.autostart.priority
to specify startup order -
boot.autostart.delay
to make containers “wait” longer until others are up
In case you want to specify dependencies, the last two are kind of a workaround and would not be required if we could specify dependencies by name directly. LXD would only start the container if all instances in that list have sent the READY event.
This could look like this:
boot.autostart.dependenies:
- container0
- container1
If you manually lxc start
a container with dependencies it should probably implicitly start all the dependencies as well.
Such functionality would be a huge improvement already but there might be cases where you want to wait for a container if they are about to be started, but they’re not a hard dependency. That’d be similar to systemd’s After=
.