Add --force to lxd import
This is required when the snapshots on disk differ from the snapshots
in backup.yaml
BUG=chromium:1194406
TEST=Manually tested
Disallow-Recycled-Builds: test-failures
Change-Id: I15c5ee65e49d23060d66c0dab8d7a569aeaef09e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/tremplin/+/2796741
Commit-Queue: Fergus Dall <sidereal@google.com>
Commit-Queue: David Munro <davidmunro@google.com>
Tested-by: Fergus Dall <sidereal@google.com>
Auto-Submit: Fergus Dall <sidereal@google.com>
Reviewed-by: David Munro <davidmunro@google.com>
diff --git a/src/chromiumos/tremplin/start_lxd.go b/src/chromiumos/tremplin/start_lxd.go
index ab94c07..c663a59 100644
--- a/src/chromiumos/tremplin/start_lxd.go
+++ b/src/chromiumos/tremplin/start_lxd.go
@@ -645,7 +645,7 @@
}
f.Close()
}
- out, err := execCommand("/usr/sbin/lxd", "import", name)
+ out, err := execCommand("/usr/sbin/lxd", "import", "--force", name)
if err != nil {
return fmt.Errorf("Error importing container. Stdout/err: %s. Error: %w", out, err)
}