start_lxd: Clear the networks folder whenever we clear the database

Between 3.17 and 4.0 LXD changed the format of the *.pid files in the
networks directory. If it finds a file in the old format, then
importing the penguin container will fail.

There is transition code in place, but it relies on the database to
tell it if the patch needs to be applied. As we delete the database by
default, LXD believes this has already happened, leaving the old files
in place.

As all the data in this directory is transient across reboots anyway,
and we promise not to change the LXD version without rebooting, just
delete it whenever we clear the database.

BUG=chromium:1097610
TEST=Updated LXD and checked that the container started up correctly

Disallow-Recycled-Builds: test-failures
Change-Id: Ib681d1c4ec2f3e7397cc3098a20988e2908aa24a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/tremplin/+/2843037
Reviewed-by: Nicholas Verne <nverne@chromium.org>
Reviewed-by: David Munro <davidmunro@google.com>
Tested-by: Fergus Dall <sidereal@google.com>
Commit-Queue: Fergus Dall <sidereal@google.com>
1 file changed
tree: fb93db0d89f5f27da09d0a5e17b128cc5f159f9a
  1. src/
  2. .gitignore
  3. OWNERS
  4. README.md
README.md

Tremplin

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