From ca059a314a0ec646ef423157ff9abde385e920c6 Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Fri, 25 Oct 2024 09:07:48 -0400 Subject: [PATCH 1/2] tests/storage-vm: replace snap restart by systemctl restart Workaround for https://bugs.launchpad.net/snapd/+bug/2028141 and https://bugs.launchpad.net/snapd/+bug/2083961 Signed-off-by: Simon Deziel --- tests/storage-vm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/storage-vm b/tests/storage-vm index 1454edfb..f5ffc766 100755 --- a/tests/storage-vm +++ b/tests/storage-vm @@ -24,7 +24,7 @@ GiB="$((1024 * MiB))" if echo "${poolDriverList}" | grep -qwF "zfs" && grep -qF zfs.external /snap/lxd/current/commands/daemon.start; then echo "==> Use external ZFS tools" snap set lxd zfs.external=true - snap restart lxd + systemctl restart snap.lxd.daemon.service if command -v zfs; then apt-get autopurge -y zfsutils-linux @@ -51,7 +51,7 @@ if echo "${poolDriverList}" | grep -qwF "zfs" && grep -qF zfs.external /snap/lxd echo "==> Use internal ZFS tools" snap unset lxd zfs.external - snap restart lxd + systemctl restart snap.lxd.daemon.service else echo "==> Skipping zfs.external test" fi From 10d599e92da1bdc97ec56471714c0687a7cadb32 Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Thu, 24 Oct 2024 11:11:10 -0400 Subject: [PATCH 2/2] tests/storage-vm: improve detection of zfs.external support Don't look for the snap option name (`zfs.external`) but for the config variable name (`zfs_external`). Improve `grep` args while at it. Signed-off-by: Simon Deziel --- tests/storage-vm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/storage-vm b/tests/storage-vm index f5ffc766..67a4d9c6 100755 --- a/tests/storage-vm +++ b/tests/storage-vm @@ -21,7 +21,7 @@ MiB="$((1024 * 1024))" GiB="$((1024 * MiB))" # zfs.external -if echo "${poolDriverList}" | grep -qwF "zfs" && grep -qF zfs.external /snap/lxd/current/commands/daemon.start; then +if echo "${poolDriverList}" | grep -qwF "zfs" && grep -qwFm1 zfs_external /snap/lxd/current/commands/daemon.start; then echo "==> Use external ZFS tools" snap set lxd zfs.external=true systemctl restart snap.lxd.daemon.service