docker-ce fails to start on AlmaLinux/RHEL 10 due to missing xt_addrtype module now that iptables no longer pulls in kernel-modules-extra unconditionally

未關閉 適合新手
#591 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
2/5
預估耗時
1-3 小時
新手友好度
74/100
Issue 類型
缺陷
描述清晰度
描述清楚
活躍度
冷清
技術堆疊
docker, linux

研究方向

從 rpm/SPECS/docker-ce.spec 開始,檢查如何為列出的 RHEL 系目標選擇套件相依項目。確認目前對 iptables 和核心模組的處理方式,接著查看 RPM spec 的建置或驗證說明。當這些目標明確相依於 kernel-modules-extra,且套件中繼資料通過驗證時,即為完成。

由索引模型根據 Issue 內容生成。

描述

Environment:
  • OS: AlmaLinux 10.2
  • Docker version: Docker version 29.6.2, build dfc4efb
  • iptables: iptables-nft-1.8.11-15.el10_2.x86_64
Description:

dockerd fails to start with:

failed to start daemon: Error initializing network controller: error obtaining controller instance: failed to register "bridge" driver: failed to add jump rules to ipv4 NAT table: failed to append jump rules to nat-PREROUTING: (COMMAND_FAILED: '/usr/sbin/iptables -t nat -A PREROUTING -m addrtype --dst-type LOCAL -j DOCKER' failed: Warning:
Extension addrtype revision 0 not supported, missing kernel module?

Root cause:

The addrtype match requires the xt_addrtype kernel module, provided by the kernel-modules-extra package on RHEL-family distros. Until recently, kernel-modules-extra was pulled in automatically as an unconditional Recommends of iptables-nft, so it was present on any system with Docker installed, even though docker-ce itself never declared it as a dependency.

That changed upstream in iptables 1.8.11-15.el10:

  • spec: Recommend kernel-modules-extra only if no other
    recommendation applies (Phil Sutter) [RHEL-186232]
    Resolves: RHEL-186232

Source: https://git.almalinux.org/rpms/iptables/commit/bdfc71a038368010b31ac9ceb282ba4b23323455

With this change, kernel-modules-extra is no longer reliably installed as a side effect of installing iptables-nft. Since docker-ce.spec does not list kernel-modules-extra as a Requires or Recommends itself, fresh installs of Docker on updated RHEL 10 / AlmaLinux 10 / Rocky 10 systems can now fail to start with the error above, depending on the exact iptables package version and what else is installed on the host.

Requested fix:

Add an explicit Requires (or at minimum Recommends) on kernel-modules-extra in rpm/SPECS/docker-ce.spec for RHEL-family targets (rhel-9, rhel-10, centos-9, centos-10), since dockerd's default bridge network setup depends on the addrtype match and can no longer assume it will be pulled in transitively via iptables.

Workaround in the meantime:

dnf install kernel-modules-extra
systemctl restart docker.service

主要語言
Dockerfile
星號
37
分支
42
平均合併
16 小時 53 分鐘
30 天內合併 PR
30

環境準備

  • 提供 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

docker/packaging 的其他 Issue

查看 docker/packaging 的全部 Issue

相似的 Issue

更多 Build System Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。