[autotest-client-tests][PATCH 0/1] Remove zfs-related packages after test
Po-Hsu Lin
po-hsu.lin at canonical.com
Tue Apr 26 04:04:03 UTC 2022
On Mon, Apr 25, 2022 at 11:42 PM Dimitri John Ledkov
<dimitri.ledkov at canonical.com> wrote:
>
> Hi,
>
> This regressess running zfs related tests, on zfs-root machines, which
> I do when preparing zfs upgrades.
>
> I wonder what we can do here. I.e. check/store some markers at setup
> to see if setup actually did anything? I.e. if zfs was already loaded,
> and zfsutils were already installed, it means they shouldn't be
> attempted to be removed or unloaded.
>
> Or can we add a further check to the cleanup test name to see if the
> machine is using zfs root anyway?
>
>
Hello,
Sorry for the hassle!
This change is meant to keep zfs module stay away from our s390x
instances when running the kernel_tainted check in ubuntu_boot test
(lp:1892124). So another approach is to revert this patch and add
exceptions in the ubuntu_boot test, tell it to ignore all the
zfs-related modules (btw we are gonna add exceptions for modules like
mlx5_ib on DGX systems).
Or, just like you mentioned here, I think we can only run the cleanup
if the root file system is zfs, by checking something like:
df -T | grep "/$" | awk '{print $2}'
Proceed the clean up if it's not "zfs"
I would like to know do we need to run ubuntu_boot test on zfs-root machines?
If that's the case revert this one and modify ubuntu_boot test will be
the only solution.
Sam
> --
> okurrr,
>
> Dimitri
>
> On Wed, 20 Apr 2022 at 13:40, Po-Hsu Lin <po-hsu.lin at canonical.com> wrote:
> >
> > 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
> >
> >
> > --
> > kernel-team mailing list
> > kernel-team at lists.ubuntu.com
> > https://lists.ubuntu.com/mailman/listinfo/kernel-team
More information about the kernel-team
mailing list