From ffc59b87d34416a8a3883184779c1e0d310ef819 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 26 Nov 2026 21:48:18 +0100 Subject: [PATCH] pkg/docker-engine: rpm: recommend additional kernel modules on EL10 RHEL 10 moved various netfilter-related kernel modules, including br_netfilter and xt_addrtype, to the kernel-modules-extra package. These modules are needed by Docker's default iptables networking backend and may be missing on minimal installations. RHEL 10.1 introduced the kernel-modules-extra-matched metapackage, which activates a conditional dependency in the distribution's kernel package to ensure that the extra modules match the installed kernel versions and are included in subsequent kernel upgrades. Recommend the matched metapackage on EL10.1 and later, falling back to kernel-modules-extra on EL10.0 if kernel-modules-core is installed. Use the system-release capability to detect the minor release, with an exception for CentOS Stream, which does not use minor releases. An unversioned dependency on kernel-modules-extra is insufficient to guarantee that the modules match the running kernel. This was confirmed on an AlmaLinux installation where both iptables-nft and kernel-modules-extra were installed, but the latter was installed for a newer kernel than the one running. Use a weak dependency (Recommends), consistent with our dependency on iptables and the distribution's own iptables packaging. This avoids imposing distribution kernel packages on users running custom kernels and preserves compatibility with UBI environments, whose default repositories do not provide these packages. Dependency resolution for the matched metapackage was verified on CentOS Stream 10, both with and without the distribution's kernel package installed. Release detection was verified on RHEL, CentOS Stream, Rocky Linux, AlmaLinux, and Oracle Linux. Installations using only kernel-core, as well as installations using the EL10.0 fallback, may still require manual installation of the extra modules matching the running kernel. See also: - https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/10/html/considerations_in_adopting_rhel_10/ Signed-off-by: Sebastiaan van Stijn --- pkg/docker-engine/rpm/docker-ce.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/docker-engine/rpm/docker-ce.spec b/pkg/docker-engine/rpm/docker-ce.spec index ebd78e6a..cf543a7f 100644 --- a/pkg/docker-engine/rpm/docker-ce.spec +++ b/pkg/docker-engine/rpm/docker-ce.spec @@ -19,6 +19,11 @@ Recommends: docker-ce-rootless-extras Requires: container-selinux Requires: systemd %if 0%{?rhel} >= 10 +# EL10 moved iptables-related kernel modules to kernel-modules-extra. +# EL10.1 introduced the matched metapackage to cover kernel upgrades. +# CentOS Stream does not use minor release versions. +Recommends: (kernel-modules-extra-matched if (system-release >= 10.1 or centos-stream-release) else (kernel-modules-extra if kernel-modules-core)) + # EL10 UBI repositories do not provide iptables or iptables-nft. Recommends: (iptables-nft or iptables) %else