Repository navigation
fix(cidata): resolve AlmaLinux 10 boot failures - #5372
Soumya-codr wants to merge 2 commits into
Conversation
Fixes lima-vm#5368 - Guard mDNS script execution by checking systemd-resolved.service unit existence using systemctl cat. - Dynamically detect missing Netfilter kernel modules on DNF distros, append kernel-modules-extra to extrapkgs, and re-execute 00-modprobe.sh right after installation. Signed-off-by: Soumya-codr <soumya.sagar.codr@gmail.com>
|
@Soumya-codr Have you tried adding Almalinux to the CI matrix in .github/workflows/test.yml too? |
wait let me see |
|
@whoschek very sorry man i havent tested that let me do that once , apologies from my end 😭 |
|
@Soumya-codr No worries. I thank you for picking up the issue and running with it :-) |
Investigation Update:
|
| Version | |
|---|---|
| Running kernel | 6.12.0-211.7.3.el10_2 |
kernel-modules-extra installed |
6.12.0-211.38.1.el10_2 |
The module gets placed in /lib/modules/6.12.0-211.38.1.el10_2/ which is useless for the running kernel (6.12.0-211.7.3).
Fix: Use kernel-modules-extra-$(uname -r) to install for the exact running kernel version:
extrapkgs="${extrapkgs} kernel-modules-extra-$(uname -r)"Problem 2: Module needs to be loaded after install
Even after installing the correct kernel-modules-extra, the xt_comment module needs to be explicitly loaded via modprobe xt_comment before BuildKit starts. The current boot sequence runs 00-modprobe.sh before 30-install-packages.sh, so modules installed later are never loaded.
Affected Distros
- AlmaLinux 10 (confirmed)
- Likely: Rocky Linux 10, CentOS Stream 10, Oracle Linux 10 (all RHEL 10-based)
- NOT affected: Fedora (has
xt_commentin base kernel modules)
Possible Fixes
- In
30-install-packages.sh: Changekernel-modules-extra‚Üíkernel-modules-extra-$(uname -r)and addmodprobe xt_commentafter install - In
40-install-containerd.sh: Load required modules before starting BuildKit - Alternative: Make BuildKit failure non-fatal during boot (containerd itself works fine)
Happy to submit a PR for whichever approach you prefer! Let me know.
Environment
- Host: macOS (Apple Silicon, Virtualization.framework / VZ)
- Guest: AlmaLinux 10 GenericCloud (
6.12.0-211.7.3.el10_2.aarch64) - Lima: built from
mainbranch
|
Am i missing out something ?? 👀 |
My question was whether you tested |
Signed-off-by: Soumya-codr <soumya.sagar.codr@gmail.com>
|
@AkihiroSuda Sorry about that you're right, the screenshot I attached earlier was just limactl validate output (YAML syntax check), not an actual systemctl is-system-running test. That was my mistake I misunderstood what you were asking for.. I've now properly tested it: Built limactl from this branch and booted an AlmaLinux 10 VM And i know i have taken a lot of time in understanding things sorry for that |
|
@AkihiroSuda The 2 failing checks ( |
| sudo -iu "${LIMA_CIDATA_USER}" "XDG_RUNTIME_DIR=/run/user/${LIMA_CIDATA_UID}" "PATH=${PATH}" "TERM=${TERM}" \ | ||
| "CONTAINERD_NAMESPACE=${CONTAINERD_NAMESPACE}" "CONTAINERD_SNAPSHOTTER=${CONTAINERD_SNAPSHOTTER}" \ | ||
| containerd-rootless-setuptool.sh install-buildkit-containerd | ||
| containerd-rootless-setuptool.sh install-buildkit-containerd || echo >&2 "WARNING: Failed to install buildkitd" |
There was a problem hiding this comment.
This seems just ignoring, not resolving the error.
What was the error?
There was a problem hiding this comment.
Okay just give me some time i will see it
There was a problem hiding this comment.
I inspected the error:
Oct 15 16:12:55 lima-almalinux systemd[1415]: Started default-buildkit.service - BuildKit (Rootless).
Oct 15 16:12:55 lima-almalinux containerd-rootless-setuptool.sh[2262]: time="2026-10-15T16:12:55+09:00" level=warning msg="CDI setup error /var/run/cdi: failed to monitor for changes: no such file or directory"
Oct 15 16:12:55 lima-almalinux containerd-rootless-setuptool.sh[2262]: time="2026-10-15T16:12:55+09:00" level=warning msg="CDI setup error /etc/buildkit/cdi: failed to monitor for changes: no such file or directory"
Oct 15 16:12:55 lima-almalinux containerd-rootless-setuptool.sh[2262]: time="2026-10-15T16:12:55+09:00" level=warning msg="CDI setup error /etc/cdi: failed to monitor for changes: no such file or directory"
Oct 15 16:12:55 lima-almalinux containerd-rootless-setuptool.sh[2262]: buildkitd: plugin type="buildkit-cni-bridge" failed (add): running [/sbin/iptables -t nat -A CNI-3d9393aba95078bfa32fecf7 -d 10.10.0.2/16 -j ACCEPT -m comment --comment name: "buildkit" id: "vu47q9o0uh6pi40vn9zh969d8" --wait]: exit status 4: Warning: Extension comment revision 0 not supported, missing kernel module?
Oct 15 16:12:55 lima-almalinux containerd-rootless-setuptool.sh[2262]: iptables v1.8.11 (nf_tables): RULE_APPEND failed (No such file or directory): rule in chain CNI-3d9393aba95078bfa32fecf7
Oct 15 16:12:55 lima-almalinux containerd-rootless-setuptool.sh[2262]: CNI setup error
Oct 15 16:12:55 lima-almalinux containerd-rootless-setuptool.sh[2262]: github.com/moby/buildkit/util/network/cniprovider.(*cniProvider).newNS
Oct 15 16:12:55 lima-almalinux containerd-rootless-setuptool.sh[2262]: /src/util/network/cniprovider/cni.go:198
Oct 15 16:12:55 lima-almalinux containerd-rootless-setuptool.sh[2262]: github.com/moby/buildkit/util/network/cniprovider.NewBridge.newCNIPool.func7.1
Oct 15 16:12:55 lima-almalinux containerd-rootless-setuptool.sh[2262]: /src/util/network/cniprovider/cni.go:131
Oct 15 16:12:55 lima-almalinux containerd-rootless-setuptool.sh[2262]: github.com/moby/buildkit/util/network/cniprovider.withDetachedNetNSIfAny.func1
Oct 15 16:12:55 lima-almalinux containerd-rootless-setuptool.sh[2262]: /src/util/network/cniprovider/cni_linux.go:97
Oct 15 16:12:55 lima-almalinux containerd-rootless-setuptool.sh[2262]: github.com/containernetworking/plugins/pkg/ns.(*netNS).Do.func1
Oct 15 16:12:55 lima-almalinux containerd-rootless-setuptool.sh[2262]: /src/vendor/github.com/containernetworking/plugins/pkg/ns/ns_linux.go:249
Oct 15 16:12:55 lima-almalinux containerd-rootless-setuptool.sh[2262]: github.com/containernetworking/plugins/pkg/ns.(*netNS).Do.func2
Oct 15 16:12:55 lima-almalinux containerd-rootless-setuptool.sh[2262]: /src/vendor/github.com/containernetworking/plugins/pkg/ns/ns_linux.go:270
Oct 15 16:12:55 lima-almalinux containerd-rootless-setuptool.sh[2262]: runtime.goexit
Oct 15 16:12:55 lima-almalinux containerd-rootless-setuptool.sh[2262]: /usr/local/go/src/runtime/asm_arm64.s:1447
Oct 15 16:12:55 lima-almalinux systemd[1415]: default-buildkit.service: Main process exited, code=exited, status=1/FAILURE
Oct 15 16:12:55 lima-almalinux systemd[1415]: default-buildkit.service: Failed with result 'exit-code'.
There was a problem hiding this comment.
BuildKit failure was resolved:
| - fedora.yaml | ||
| - archlinux.yaml | ||
| - opensuse.yaml | ||
| - almalinux-10.yaml |
There was a problem hiding this comment.
Should we mark this as Tier 2?


What This PR Changes
This PR resolves AlmaLinux 10 (and similar RHEL/EL10 distros) CI boot failures by addressing two root causes:
mDNS Script Failure (
06-enable-mdns-on-systemd.sh): AlmaLinux 10 ships withresolvectlbut does not includesystemd-resolved.service. Added asystemctl cat systemd-resolved.service >/dev/null 2>&1 || exit 0guard so the script exits cleanly instead of attempting service restart and markingcloud-final.serviceas degraded.Missing Netfilter Modules (
30-install-packages.sh): Netfilter modules such asiptable_natandxt_commentare packaged underkernel-modules-extraon EL10. Added capability checks (modprobe -n), appendedkernel-modules-extra-$(uname -r)andkernel-modules-extratoextrapkgsunder DNF distros, and re-executed00-modprobe.shright after package installation to load modules into kernel memory.Linked Issue (Required in most cases)
Closes #5368
How I Tested This
make shfmt(0 formatting errors).go test -v ./pkg/cidata/...(All unit tests passed).makeand validated template:./_output/bin/limactl validate templates/_images/almalinux-10.yaml(OK).