Repository navigation
fix(install): Docker on AlmaLinux, Rocky and Oracle Linux, and the kernel modules RHEL 10 images leave out - #242
Merged
Conversation
…rnel modules RHEL 10 images leave out
- AlmaLinux, Rocky Linux and Oracle Linux 8, 9 and 10: get.docker.com adds Docker's repo named
after them, which has no Docker Engine packages ("Unable to find a match: docker-ce"). They now
install from Docker's CentOS repo.
- CentOS Stream, AlmaLinux and Rocky Linux 10 images lack xt_addrtype and xt_ipvs (Docker won't
start / Swarm can't reach its services, 502), Oracle Linux's UEK kernel lacks xt_ipvs. The script
installs kernel-modules-extra (or kernel-uek-modules-extra and -netfilter) for the running kernel
before Docker, and restarts a Docker that was already running.
- Running the script again after a failed start now recovers: the module check runs every time,
systemd's "start request repeated too quickly" lock is cleared, and a failed start shows Docker's
last log lines.
- The docs' "Installing Docker" section says how to do the same by hand.
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
curl -fsSL https://pelican.dev/install.sh | sudo bashfailed on the RHEL family:get.docker.comadds Docker's repo named after them (linux/rocky/…,linux/alma/…). Those repos exist but contain nodocker-cepackages, and neither doeslinux/oracle/…. The script stops within seconds with "Unable to find a match: docker-ce".xt_addrtype, which ships inkernel-modules-extra.systemctl enable --now docker.Testing turned up two more:
xt_ipvsis missing. The CentOS Stream, AlmaLinux and Rocky Linux 10 images and Oracle Linux's UEK kernel all lack it. Docker runs and the script finishes, but Traefik answers 502.get.docker.comstarts Docker during the install, before the module is there. The failed starts left systemd refusing new ones ("Start request repeated too quickly").What changes
All in
public/install.sh.dnf. Detection uses/etc/os-release:IDnot in centos/rhel/fedora, withID_LIKEcontaining rhel or centos, plus Oracle'sol, whoseID_LIKEis onlyfedora. The repo file has the same name as the oneget.docker.comwrites, so it also replaces what a failed earlier run added. Ubuntu, Debian, Fedora, CentOS Stream and RHEL still useget.docker.com.xt_addrtypeandxt_ipvs.kernel-modules-extra, or on UEKkernel-uek-modules-extraandkernel-uek-modules-extra-netfilter, for the running kernel.dnfsystems it only warns.systemctl reset-failed dockerbefore starting it. If Docker still doesn't start, the script prints its last 20 log lines and says so.Verification
Real VMs with Lima (arm64, Apple Virtualization). Each one: a fresh image, the script run with
--skip-dns-check, thenGET /installeron the server./installer200addrtypemissing); a second run fails the same way/installer200 in one runxt_addrtype/xt_ipvs,/installer200/installer200/installer200Recovering a broken server: the fixed script was rerun on servers the old script (or an earlier version of this fix) left broken:
All three ended with
/installer200. A third run on a working server changes nothing.Rocky Linux 8 and AlmaLinux 8: the EL8 arm64 images don't boot under Apple Virtualization, so only the install step was checked, in
rockylinux:8andalmalinux:8containers. Docker's CentOS repo installsdocker-ce26.1.3, the last version Docker built for EL8.bun test: 149 pass.scripts/install-sh.test.mjsgains 11 cases on which install method each system gets, using a fakeos-release(PELICAN_OS_RELEASE, for the tests only); the 4 RHEL-rebuild cases fail on the old script.shellcheckis clean.bun run typecheckandbun run build(withcheck:contentandcheck:paths) pass.Not checked:
Note
Fix Docker install on AlmaLinux, Rocky, and Oracle Linux and add missing kernel modules
os-release(ID,ID_LIKE) and installs Docker from Docker's CentOS repository withdnfon matching systems like AlmaLinux, Rocky, and Oracle Linux, instead of the generic Docker script.xt_addrtypeandxt_ipvswithmodprobeand installs matchingkernel-modules-extra(or UEK variants for Oracle kernels) when they are missing. It aborts with guidance if the modules stay unavailable, and restarts Docker afterward when packages were added.rhel_rebuildpredicate excludes CentOS, RHEL, Fedora, and unset IDs; check that new distributions match expectations, and note the os-release path can be overridden viaPELICAN_OS_RELEASE.Macroscope summarized 363371e.