The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/8194

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
Signed-off-by: Thomas Parrott <thomas.parr...@canonical.com>
From de1a496c6ba1dcef90b540259ba8fb63b5a9edc4 Mon Sep 17 00:00:00 2001
From: Thomas Parrott <thomas.parr...@canonical.com>
Date: Thu, 26 Nov 2020 15:59:52 +0000
Subject: [PATCH] test/suites/migration: Adds tests for copying instance with
 snapshots containing invalid disk devices

Signed-off-by: Thomas Parrott <thomas.parr...@canonical.com>
---
 test/suites/migration.sh | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/test/suites/migration.sh b/test/suites/migration.sh
index f2416eed6b..2e7c3bc5e0 100644
--- a/test/suites/migration.sh
+++ b/test/suites/migration.sh
@@ -368,6 +368,25 @@ migration() {
   lxc_remote project switch l1:default
   lxc_remote project delete l1:proj
 
+
+  # Check migration with invalid snapshot config (disks attached with missing 
source pool and source path).
+  lxc_remote init testimage l1:c1
+  lxc_remote storage create l1:dir dir
+  lxc_remote storage volume create l1:dir vol1
+  lxc_remote storage volume attach l1:dir vol1 c1 /mnt
+  mkdir "$LXD_DIR/testvol2"
+  lxc_remote config device add l1:c1 vol2 disk source="$LXD_DIR/testvol2" 
path=/vol2
+  lxc_remote snapshot l1:c1 # Take snapshot with disk devices still attached.
+  lxc_remote config device remove c1 vol1
+  lxc_remote config device remove c1 vol2
+  rmdir "$LXD_DIR/testvol2"
+  lxc_remote copy l1:c1 l2:
+  lxc_remote info l2:c1 | grep snap0
+  lxc_remote delete l1:c1 -f
+  lxc_remote delete l2:c1 -f
+  lxc_remote storage volume delete l1:dir vol1
+  lxc_remote storage delete l1:dir
+
   if ! which criu >/dev/null 2>&1; then
     echo "==> SKIP: live migration with CRIU (missing binary)"
     return
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to