running lxd 4.6 latest/stable snap
I am playing around with my 3 node LXD cluster and have given some of my containers a boot.autostart.priority and boot.stop.priority together with a boot.autostart.delay
Unfortunately these options are only taken into account when stopping and starting the LXD daemon.
If I want to stop/start multiple containers through the use of
--all these priorities are ignored and my applications are not happy that they are up&running before my databases are
If I want this functionality without having to restart the LXD daemon, do I have to talk to the API myself to obtain all the priorities and delays, to then start them manually ?
The priorities come from a profile, like such:
root @ node1 # lxc profile ls | grep prio | prio.critical | 1 | | prio.high | 3 | | prio.low | 5 | | prio.medium | 1 | root @ node1 # lxc profile show prio.low config: boot.autostart.delay: "15" boot.autostart.priority: "100" boot.stop.priority: "-100"
It’s all in yaml <3 so I could probably write a python script parsing the used_by of the 4 profiles and have them start in the right order. But to fit this in a
lxc alias would be really exotic! Time to look at the possibilities of aliases
What do you think about an option that keeps the priorities in mind when using --all?