Skip to content

fix: load netfilter comment modules for rootless BuildKit on EL10 - #5664

Open
mvanhorn wants to merge 1 commit into
lima-vm:masterfrom
mvanhorn:fix/5623-el10-buildkit-xt-comment
Open

mvanhorn wants to merge 1 commit into
lima-vm:masterfrom
mvanhorn:fix/5623-el10-buildkit-xt-comment

Conversation

@mvanhorn

@mvanhorn mvanhorn commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

What This PR Changes

On AlmaLinux 10, rootless BuildKit exits while its CNI bridge is being added. iptables returns exit status 4 on the nat ACCEPT rule that uses a comment match, warning that extension comment revision 0 is unsupported because a kernel module is missing. The BuildKit service then fails.

iptables-nft serves -m comment through nft_compat together with xt_comment. Guest boot loaded nf_tables and xt_comment and left nft_compat out. On dnf-based guests the xt_comment module is packaged in kernel-modules for the running kernel (kernel-uek-modules on UEK), which is often absent, and rootless iptables cannot autoload that match.

Changes:

  • The boot modprobe list now includes nft_compat.
  • On dnf, when iptables is being installed and modprobe -n xt_comment fails, the package script adds kernel-modules for the running kernel, or kernel-uek-modules when the release is UEK. It then runs the modprobe script again so those modules are loaded before rootless BuildKit starts.
  • A modules package missing from the repositories yields a warning and the install continues.
  • The Oracle Linux virtiofs path still requests kernel-uek-modules and appends it only when it is not already listed. UEK repositories are enabled whenever that package is in the extra set.

Linked Issue (Required in most cases)

Closes #5623

How I Tested This

No local test run is recorded for the lima change to pkg/cidata/cidata.TEMPLATE.d/boot.Linux/00-modprobe.sh and pkg/cidata/cidata.TEMPLATE.d/boot.Linux/30-install-packages.sh.

AI Usage

AI was used for assistance.

The boot modprobe list now includes nft_compat. On dnf, when iptables is
being installed and modprobe -n xt_comment fails, the package script
adds kernel-modules for the running kernel, or kernel-uek-modules when
the release is UEK, then runs the modprobe script again so those modules
are loaded before rootless BuildKit starts. A modules package missing
from the repositories yields a warning and the install continues. The
Oracle Linux virtiofs path still requests kernel-uek-modules, appends it
only when it is not already listed, and UEK repositories are enabled
whenever that package is in the extra set.

Fixes lima-vm#5623

Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
@AkihiroSuda

Copy link
Copy Markdown
Member

No local test run is recorded for the lima change

Why not?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment