[autotest-client-tests][PATCH 0/1] Remove zfs-related packages after test
Po-Hsu Lin
po-hsu.lin at canonical.com
Wed Apr 20 12:39:20 UTC 2022
BugLink: https://bugs.launchpad.net/bugs/1892124
Stop zfs daemon and remove zfs related packages after test to prevent
manually provisioned system from booting with out-of-tree zfs modules
and failed with the kernel_tainted test in ubuntu_boot like:
Kernel taint value is 4097
Taint bit value: 0 (proprietary module was loaded)
* Modules with GPL Incompatible Licenses:
zfs: CDDL
zunicode: CDDL
zcommon: CDDL
znvpair: CDDL
zavl: CDDL
icp: CDDL
Taint bit value: 12 (externally-built ('out-of-tree') module was loaded)
* Modules not in-tree:
zfs
zunicode
zzstd
zlua
zcommon
znvpair
zavl
icp
spl
This is done by adding a sub-test called post-test-zfs-cleanup and
catch it in run_once(). Not using cleanup() because it will be
triggered after each sub test. It's fine for test like
ubuntu_zfs_stress, but it will be complicated for test with multiple
sub-tests e.g. ubuntu_zfs_xfs_generic
The downside of this is that if you're trying to run it again on
the same SUT manully without removing the autotest/client/tmp/
directory, the setup task won't be triggered as the test version
didn't change. To workaround this we will need to move the code in
setup() to initialize() like what we did for ubuntu_sysdig_smoke_test,
to trigger the package installation, or, remove the .version file in
autotest/client/tmp/TESTNAME/
Search criteria to locate tests that need this change:
grep -r zfsutils-linux *
Manually tested on s390x LPAR s2lp4 with the following two tests,
each test has been executed twice to make sure the .version removal
workaround works. Test performed without rebooting this SUT:
* ubuntu_zfs_smoke_test
* ubuntu_zfs_xfs_generic
The zfs module will be unloaded and removed in the end of the test
as expected, SUT rebooted and with no tainted flag.
Po-Hsu Lin (1):
UBUNTU: SAUCE: Remove zfs-related packages after test
ubuntu_performance_fio/control | 1 +
ubuntu_performance_fio/ubuntu_performance_fio.py | 9 +++++++++
ubuntu_performance_zfs_encryption/control | 1 +
.../ubuntu_performance_zfs_encryption.py | 10 ++++++++++
ubuntu_zfs/control | 6 ++++--
ubuntu_zfs/ubuntu_zfs.py | 9 +++++++++
ubuntu_zfs_fstest/control | 5 +++--
ubuntu_zfs_fstest/ubuntu_zfs_fstest.py | 11 ++++++++++-
ubuntu_zfs_smoke_test/control | 1 +
ubuntu_zfs_smoke_test/ubuntu_zfs_smoke_test.py | 10 ++++++++++
ubuntu_zfs_stress/control | 5 ++---
ubuntu_zfs_stress/ubuntu_zfs_stress.py | 10 ++++++++++
ubuntu_zfs_xfs_generic/control | 3 ++-
ubuntu_zfs_xfs_generic/ubuntu_zfs_xfs_generic.py | 12 +++++++++++-
14 files changed, 83 insertions(+), 10 deletions(-)
--
2.25.1
More information about the kernel-team
mailing list