I’ve a Python3.8 PyLXD task which is running via systemd and its has a After dependancy on snapd which of course runs lxd.
However I’ve issues in that it runs before the containers themselves have started and I’m getting race conditions.
Is their some way of ascertaining if LXD is running and has started the containers?
I can see there is a volatile.last_state.power configuration entry does that tell me if the container is supposed to be running? So for instance if the container is Stopped and last_state_power says RUNNING is that a good enough sign?