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 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
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分
マージ済み PR(30日)
30

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

docker/packaging のほかの issue

docker/packaging の issue をすべて見る

似ている issue

Build System の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。