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.

BUG=chromium:1155404
TEST=Deploy on a broken image, verify that it starts the container

Change-Id: I0a0cd438dccf5eedab6ef8c75933068f1fe0b2d7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/tremplin/+/2586416
Reviewed-by: Nicholas Verne <nverne@chromium.org>
Reviewed-by: David Munro <davidmunro@google.com>
Commit-Queue: David Munro <davidmunro@google.com>
Tested-by: David Munro <davidmunro@google.com>
4 files changed
tree: 55949f9f79ed15b23eda83631f0d73b40a0a1956
  1. .gitignore
  2. OWNERS
  3. README.md
  4. src/
README.md

Tremplin

Tremplin is the “springboard” daemon that runs in the Termina VM and exposes a gRPC interface for managing LXD containers.