Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config/env/sys-fs/zfs-kmod: un-break zfs-kmod binpkg install #2260

Merged
merged 1 commit into from
Aug 30, 2024

Conversation

t-lo
Copy link
Member

@t-lo t-lo commented Aug 28, 2024

This change sets SKIP_KERNEL_BINPKG_ENV_RESET in the zfs-kmod env so linux-info.eclass keeps kernel env variables. This resolves an issue with installing zfs-kmod as a binpkg when the kernel was not yet installed. In a pure binpkg install the zfs-kmod package might be installed before the kernel, leading to the kmod's kernel version detection to fail.

The original issue may be reproduced by running a rebuild of a release tag (which will use binpkgs from our mirrors). Note that the reproduction is flaky because the issue is caused by a race condition between installing the kernel binpkg and zfs-kmod.

How to use

  • Reproduce by rebuilding a recent release tag
     git clone https://github.com/flatcar/scripts.git
     cd scripts
     git checkout alpha-4054.0.0
     ./run_sdk_container -t
           ./build_packages
    
    As noted above it might be necessary to run the package build multiple times to reproduce the issue. Make sure to docker container prune between runs so the build starts from scratch.
  • Apply patch from this branch, try to repro. The issue should not repro anymore.

Testing done

Ran the above builds.

Cherry-pick / backport

Should be cherry-picked to all maintenance branches that ship the zfs sysext (i.e. all except LTS): flatcar-3975 flatcar-4012 flatcar-4054

@t-lo t-lo requested a review from a team August 28, 2024 12:58
This change sets SKIP_KERNEL_BINPKG_ENV_RESET in the zfs-kmod env so
linux-info.eclass keeps kernel env variables. This resolves an issue
with installing zfs-kmod as a binpkg when the kernel was not yet
installed. In a pure binpkg install the zfs-kmod package might be
installed before the kernel, leading to the kmod's kernel version
detection to fail.

Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
@t-lo t-lo force-pushed the t-lo/fix-zfs-kmod-binpkg-install-error branch from 50959ad to 3c9f90f Compare August 28, 2024 14:55
Copy link

github-actions bot commented Aug 28, 2024

Build action triggered: https://github.com/flatcar/scripts/actions/runs/10630574877

@t-lo t-lo requested a review from jepio August 29, 2024 10:10
Copy link
Member

@jepio jepio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the function below (cros_pre_pkg_setup_kernel_version) still useful with this change?

@t-lo
Copy link
Member Author

t-lo commented Aug 30, 2024

is the function below (cros_pre_pkg_setup_kernel_version) still useful with this change?

That's a good question - I'm not really close to this part of our eclasses. We might want to simply try removing it in a follow-up PR and see what happens...

@t-lo t-lo merged commit d953260 into main Aug 30, 2024
7 checks passed
t-lo added a commit that referenced this pull request Aug 30, 2024
config/env/sys-fs/zfs-kmod: un-break zfs-kmod binpkg install
t-lo added a commit that referenced this pull request Aug 30, 2024
config/env/sys-fs/zfs-kmod: un-break zfs-kmod binpkg install
t-lo added a commit that referenced this pull request Aug 30, 2024
config/env/sys-fs/zfs-kmod: un-break zfs-kmod binpkg install
@t-lo
Copy link
Member Author

t-lo commented Aug 30, 2024

Merged to main and cherry-picked to flatcar-3975, flatcar-4012, and flatcar-4054.

@t-lo t-lo deleted the t-lo/fix-zfs-kmod-binpkg-install-error branch August 30, 2024 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants