Repository navigation
Conversation
There was a problem hiding this comment.
🔵 Needs a closer look
Human validation on an EL10 host is needed because existing --nodeps installation and version checks bypass the repository metadata and DNF dependency behavior needed to ensure matching modules track kernel upgrades.
No open issues 🎉
What changed in this PR
Updates Docker Engine’s RPM packaging to address missing netfilter modules on minimal RHEL 10 installations, targeting the daemon startup failure reported in #610.
Changes:
- Adds
kernel-modules-extra-matchedas a weak recommendation for RHEL 10 and later, allowing installations with custom kernels. - Documents the module relocation and the matched metapackage’s role in covering subsequent kernel upgrades.
| File | Description |
|---|---|
pkg/docker-engine/rpm/docker-ce.spec |
Adds the conditional kernel-module recommendation and explanatory comments. |
Review effort: Balanced
RHEL 10 moved various netfilter-related kernel modules, including those needed by Docker's default iptables networking backend, to the kernel-modules-extra package. These modules may be missing on minimal installations. Recommend kernel-modules-extra-matched instead of kernel-modules-extra. The former is a metapackage that activates a conditional dependency in the distribution's kernel package, ensuring that the extra modules match the installed kernel versions and are included in kernel upgrades. Use a weak dependency (Recommends) instead of a hard dependency (Requires), as users may be running a custom kernel that already provides the required functionality. The metapackage itself does not pull in a kernel, so there is no need to make the recommendation conditional on kernel-core. Dependency resolution was verified on CentOS Stream 10 (aarch64), both with and without the distribution's kernel package installed. Installations using only kernel-core are not covered by the matching mechanism and may still require manual installation of the extra modules. 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 <github@gone.nl>
0c3c0b5 to
f848805
Compare
| %if 0%{?rhel} >= 10 | ||
| # RHEL 10 moved iptables-related kernel modules to kernel-modules-extra. | ||
| # Use the matched metapackage to cover subsequent kernel upgrades. | ||
| Recommends: kernel-modules-extra-matched |
There was a problem hiding this comment.
Do we know if this was a regression caused by #600?
In this case, we might need to make it
| Recommends: kernel-modules-extra-matched | |
| Requires: kernel-modules-extra-matched |
otherwise this only could be hit by the "no install recommends" install, and so in this case it would also not install that kernel-modules-extra-matched
There was a problem hiding this comment.
| Recommends: kernel-modules-extra-matched | |
| Requires: kernel-modules-extra-matched if redhat-release >= 10.1 else (kernel-modules-extra if kernel-modules-core) |
Requiring kernel-modules-extra-matched is safe for EL 10.1+ as it's an empty marker package which is inert unless a kernel is installed. The else-branch covers 10.0 which lacks the -matched package, requiring the modules if a kernel is installed.
There was a problem hiding this comment.
Do we know if this was a regression caused by #600?
I did some testing on an AlmaLinux 10.3 VM, and was able to reproduce; looks like it's not related;
Both iptables-nft and kernel-modules-extra were installed, but the latter was installed for a newer kernel (6.12.0-264.20.1.el10_3), not the running kernel (6.12.0-264.16.1.el10_3).
The iptables-nft package's own recommendation:
Recommends: (kernel-modules-extra if kernel-modules-core)was therefore already satisfied. Explicitly installing iptables-nft also resulted in a no-op.
Installing kernel-modules-extra matching the running kernel resolved the daemon startup failure.
This demonstrates why we need the kernel-modules-extra-matched metapackage where available, rather than just a dependency on kernel-modules-extra. Reverting our iptables dependency from Recommends to Requires would not address this problem.
rpm: recommend kernel-modules-extra-matched on RHEL 10
RHEL 10 moved various netfilter-related kernel modules, including
those needed by Docker's default iptables networking backend, to
the kernel-modules-extra package. These modules may be missing
on minimal installations.
Recommend kernel-modules-extra-matched instead of kernel-modules-extra.
The former is a metapackage that activates a conditional dependency
in the distribution's kernel package, ensuring that the extra modules
match the installed kernel versions and are included in kernel upgrades.
Use a weak dependency (Recommends) instead of a hard dependency
(Requires), as users may be running a custom kernel that already
provides the required functionality.
The metapackage itself does not pull in a kernel, so there is no
need to make the recommendation conditional on kernel-core.
Dependency resolution was verified on CentOS Stream 10 (aarch64),
both with and without the distribution's kernel package installed.
Installations using only kernel-core are not covered by the matching
mechanism and may still require manual installation of the extra
modules.
See also: