[lxc-devel] [lxd/master] test: Don't copy running lvm/ceph containers
stgraber on Github
lxc-bot at linuxcontainers.org
Thu Sep 7 03:28:14 UTC 2017
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 449 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20170907/8d28518e/attachment.bin>
-------------- next part --------------
From def9cd53a536a0405dbb42effd635f839d6b4064 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Wed, 6 Sep 2017 23:24:46 -0400
Subject: [PATCH] test: Don't copy running lvm/ceph containers
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Running containers when backed by LVM or Ceph may be in an inconsistent
state during copy.
Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
test/suites/template.sh | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/test/suites/template.sh b/test/suites/template.sh
index da6b1d5c2..431ea8ec7 100644
--- a/test/suites/template.sh
+++ b/test/suites/template.sh
@@ -10,6 +10,10 @@ test_template() {
lxc start template
lxc file pull template/template - | grep "^name: template$"
+ if [ "$lxd_backend" = "lvm" ] || [ "$lxd_backend" = "ceph" ]; then
+ lxc stop template --force
+ fi
+
# Confirm it's not applied on copies
lxc copy template template1
lxc file pull template1/template - | grep "^name: template$"
@@ -25,6 +29,9 @@ test_template() {
# Confirm that the template doesn't trigger on create
! lxc file pull template/template -
+ if [ "$lxd_backend" = "lvm" ] || [ "$lxd_backend" = "ceph" ]; then
+ lxc stop template --force
+ fi
# Copy the container
lxc copy template template1
More information about the lxc-devel
mailing list