tremplin: Add a fallback way to start LXD
https://github.com/lxc/lxd/issues/8227 is now the second issue where the
backup.yaml ends up out-of-sync with the filesystem state resulting in
an unbootable container. Now been fixed upstream but we still need to
handle this case until we're back in sync with upstream.
Previously we manually updated the backup.yaml file, now that we've seen
two cases let's use a more general approach.
We first try the lxd import way of loading container state, since that's
been the faster and more reliable approach, if that fails we fall back
to loading from the dqlite database.
TEST=Deploy on a broken image, verify that it starts the container
Reviewed-by: Nicholas Verne <firstname.lastname@example.org>
Reviewed-by: David Munro <email@example.com>
Commit-Queue: David Munro <firstname.lastname@example.org>
Tested-by: David Munro <email@example.com>
4 files changed