On Focal the newly released LXD 5.21 in latest/stable require ZFS 2.1
from 5.15 HWE kernel.
With that version of LXD installed the shiftfs-lxd.sh test will fail
with:
Error: Required tool zpool is missing
LXD team suggests to use 5.21/stable, which contains ZFS 0.8 suport.
Shiftfs support will be dropped from 6.5 variants on Jammy as well.
The result we saw for J-hwe-6.5 in sru-20231030 is because we are
still in the middle of this transition.
Use `dpkg --compare-versions` for kernel version comparison.
Signed-off-by: Po-Hsu Lin <email address hidden>
Acked-by: Andrei Gherzan <email address hidden>
Signed-off-by: Po-Hsu Lin <email address hidden>
On Jammy, the preloaded 5.0 stable lxd is too old for 6.5 ZFS. And thus
causing this issue even with the presence of zpool command:
Error: Required tool zpool is missing
Fix this by refreshing the snap with with latest/stable channel.
Signed-off-by: Po-Hsu Lin <email address hidden>
Acked-by: Francis Ginther <email address hidden>
Test indicates on slower instances like Google g1-small, the container
we started for test purposes might not be ready yet to process the
signal from "lxc stop" command. And test consequently timeout.
Use --force to stop the container forcefully after test finishes,
another approach would be checking if it's fully ready. Since we just
care about the command we want to test and we don't care about possible
data corruption of the container for the test, I think adding this flag
is enough.
This issue was spotted with shiftfs-lxd.sh test. Add this flag to other
tests as well just in case.
Signed-off-by: Po-Hsu Lin <email address hidden>
Acked-by: Sean Feole <email address hidden>
Acked-by: Francis Ginther <email address hidden>
Signed-off-by: Po-Hsu Lin <email address hidden>
Test on Mantic shows shiftfs-lxd.sh requires lxd 5.17 to run, otherwise
it will fail with:
Error: Required tool zpool is missing
Creating c1
Error: Failed loading storage pool "zfs": Storage pool not found
Error: Instance not found
FAIL
Error: Instance not found
Error: Failed checking instance exists "local:c1": Instance not found
Error: Storage pool not found
With lxd 5.13 preloaded on Mantic, we need to run the refresh command
to ensure it's up-to-date.
Remove the if statement for lxc command check, just try to install and
refresh it.
Signed-off-by: Po-Hsu Lin <email address hidden>
Acked-by: Andrea Righi <email address hidden>
Signed-off-by: Po-Hsu Lin <email address hidden>