[lxc-devel] [lxd/master] rework (live) migration tests

tych0 on Github lxc-bot at linuxcontainers.org
Mon May 9 14:52:32 UTC 2016


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 713 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20160509/e95767cd/attachment.bin>
-------------- next part --------------
From 421c8f202b49e5cbb23d43fa63f31ef7ccd8b49f Mon Sep 17 00:00:00 2001
From: Tycho Andersen <tycho.andersen at canonical.com>
Date: Mon, 9 May 2016 08:32:03 -0600
Subject: [PATCH] rework (live) migration tests

In particular, same-host-different-lxd migration doesn't work right now
because of some cgroup path issues. CRIU will need to learn how to rewrite
mount paths to support this use case, but it's not a super high priority
right now.

Instead, let's use stateful snapshot/restore which will work, so that we
can at least test the CRIU machenery.

Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
---
 test/suites/migration.sh | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/test/suites/migration.sh b/test/suites/migration.sh
index f092806..da0c928 100644
--- a/test/suites/migration.sh
+++ b/test/suites/migration.sh
@@ -64,8 +64,12 @@ test_migration() {
     return
   fi
 
-  lxc_remote launch testimage migratee
+  lxc_remote launch testimage l1:migratee
 
-  lxc_remote move l1:migratee l2:migratee
-  lxc_remote stop l2:migratee --force
+  # let the container do some interesting things
+  sleep 1s
+
+  lxc_remote stop --stateful l1:migratee
+  lxc_remote start l1:migratee
+  lxc_remote stop --force l1:migratee
 }


More information about the lxc-devel mailing list