Repository navigation
Conversation
|
The A build root for either that is missing |
Pushed test run β blob sha: |
|
@ci-robbot please check that and apply the qa passed label if it passes your tests |
36db032 to
67b4bf4
Compare
Rebased onto |
CI turned up a new, unrelated failure on this branch: Fixed by collapsing both commands into a single |
|
Picking this up for QA. |
QA Result: PASS
The gap I raised on 2026-09-16 is closed. Mutation check: restoring the old The risk worth checking was the opposite one: that the new probe silently drops
The differing numeric prefixes confirm the glob rather than a fixed path is the The
Two notes, neither blocking:
Not booted: no dracut run and no ISO. What is verified is the module list the The 6 red checks ( Summary: the fix closes the reported gap without dropping the module on |
4242dab to
1916453
Compare
CI failed across roughly 18 unrelated jobs (install, reset, upgrade, provider variants, selinux) with symptoms pointing at host contention β a kernel clocksource watchdog stall and a duplicate |
|
@mudler CI red on this branch is pre-existing β same install/acceptance/install-target/test-core-fips-install/test-core-ubuntu-20-install failures landed on #4726 (merged Sep 18) before I touched anything. Suite looks broken on master. Fine to merge this once you're OK with the change itself; the failures aren't mine. |
Investigated the one red leg on this run: This is the same failure mode already tracked in #4489 (fixed by #4490: per-step ceilings capped at 10m, explicit No rebase needed: the branch is already at |
Same run, now further along: 13 legs red ( That's a host/runner reachability problem, not a boot-flow issue this PR's dracut/network-module diff could cause (that code only runs pre-switch_root, before any of this). Same category of failure as the two previous rounds on this PR (clock-watchdog stalls, an SSH-dial timeout inside an already-networked cluster test) β consistent with shared-runner contention rather than a regression. Every test that doesn't boot a full VM (partition-validation, custom-partitioning, insecure-registry, encryption-, uki-) is green. No code action taken. Branch is already at |
Run 35696064823 finished. The new failures beyond my last update (acceptance, install, reset, bundles, upgrade-with-cli) show the same signature I already flagged: Branch is already at upstream tip, so there's nothing to rebase to retrigger. |
|
Board note: my |
Checked the failing checks on this PR. They aren't caused by this change: the same "ssh: handshake failed: EOF" / "Timed out after 750s" failure reproduces identically on two unrelated branches (ci/flavor-build-matrix, fix/4817-recovery-ssh-flags) whose diffs don't touch dracut or network config, and two of the failing lanes here (Ubuntu 20.04, Rocky 9) never reach this PR's new code path β their dracut module list is unchanged by this diff. The guest does boot in this PR's own run; the console reaches a login prompt, only sshd never comes up afterward. Looks like a repo-wide QEMU test-lane issue that started around 2026-09-21, not a regression from this change. Branch unit tests are green. Will re-check once the lanes are healthy again. |
The distro/version logic that picks the dracut network modules lived in the middle of GetKairosInitramfsFilesStage, ~100 lines deep in a function that also writes a dozen yip stages, and it probed the build root with absolute os.Stat paths. That made the selection impossible to unit test without the host filesystem deciding the answer. Move it verbatim into dracutNetworkModules and take the build root as an argument, so the daemon probes can be pointed at a fixture. Callers pass "/". No behavior change. Signed-off-by: itxaka-agent <itxaka-agent@users.noreply.github.com>
Table over the distro/version combinations dracutNetworkModules knows about, each against a fabricated build root, asserting the module list it produces today. Three rows show the reported bug: with systemd-resolved installed and the dracut module available, Ubuntu 22.04, openSUSE Leap and Debian still end up with "systemd-networkd network-legacy" and no systemd-resolved, so nothing brings up a resolver in the initramfs and name lookups there fail. Signed-off-by: itxaka-agent <itxaka-agent@users.noreply.github.com>
β¦nitramfs The dracut systemd-resolved module was only asked for on Hadron, Ubuntu 24.04+ and Fedora-with-networkd. Everything else that boots the initramfs with systemd-networkd -- Ubuntu 21.04 to 22.04, openSUSE/SLES, Debian -- got "systemd-networkd network-legacy" and no resolver, because networkd leaves /etc/resolv.conf to resolved and never writes it itself. Name lookups in the initramfs then fail, which is what breaks reaching a kcrypt-challenger server by hostname (kairos-io#835). Decide resolved once, at the end of the selection: add it when the module list contains systemd-networkd and does not already carry resolved. The other dracut network modules (network, network-legacy, network-manager) bring their own resolver, so they are deliberately left alone. Asking for a module dracut does not have aborts the initramfs build, so gate it on availability: both the daemon and a dracut module directory have to exist in the image. That also replaces the Fedora branch's daemon-only check, which could ask dracut for a module it does not ship. Signed-off-by: itxaka-agent <itxaka-agent@users.noreply.github.com>
Ubuntu 22.04, openSUSE Leap and Debian now expect systemd-resolved in the module list. The rows that stay resolver-free say why: the plain network, network-legacy and network-manager modules write /etc/resolv.conf themselves, and a build root where dracut has no systemd-resolved module must not ask for one. Signed-off-by: itxaka-agent <itxaka-agent@users.noreply.github.com>
β¦ations directly The dracutNetworkModules table only ever exercises this helper through the full selection, and never happens to cover the module-present/daemon-absent case even though the function is documented to require both. Signed-off-by: itxaka-agent <itxaka-agent@users.noreply.github.com>
The systemd-resolved dracut module's check() calls require_binaries on both resolvectl and the resolved daemon, and dracut does not skip a module listed in add_dracutmodules when its check fails - it exits 1 and produces no initramfs. Probing only the daemon was therefore enough to turn a missing-DNS initramfs into a failed image build on any root that carries systemd-resolved without resolvectl. Signed-off-by: itxaka-agent <itxaka-agent@users.noreply.github.com>
The module selection now asks for systemd-resolved everywhere networkd drives the initramfs, but Ubuntu 22.04 still comes out with the old list, which reads like the probe is broken. It is not: jammy only ever published dracut 051 and the module landed upstream in 054, so nothing installable on that release provides it. Write that down next to the probe so the next reader does not go looking for a missing package. Signed-off-by: itxaka-agent <itxaka-agent@users.noreply.github.com>
β¦ models "the plain networkd list" read like the plain network module the <= 20.04 branch picks a few lines above, so quote the list it actually keeps. The 22.04 table row that ends in systemd-resolved was named as if jammy gets the module: it does not, dracut 051 has none, so say the row stands for a backported dracut. Signed-off-by: itxaka-agent <itxaka-agent@users.noreply.github.com>
β¦d probe Those three branches set systemd-resolved on the dracut module list outright, so the availability check at the end of the function saw the module already there and never ran. A build root missing resolvectl or the dracut module still got it into add_dracutmodules, which fails the whole initramfs build. Drop the unconditional add and let the single probe decide for every distro. Signed-off-by: itxaka-agent <itxaka-agent@users.noreply.github.com>
The stage ran "rm /etc/resolv.conf" before creating the symlink. On a rootfs that ships without /etc/resolv.conf at all, Ubuntu 20.04 being one, rm has nothing to remove and exits non zero. yip stops a stage at the first failing command, so the "ln -s" never ran and the machine booted with no /etc/resolv.conf and no resolver. This is what failed the test-core-ubuntu-20 acceptance job, where the networking check reported "curl: (6) Could not resolve host: google.it". Dropping the separate rm and using "ln -sf" replaces whatever sits at the path, a file, a symlink or nothing, in one command that cannot fail on a missing target. Every other symlink in the bundled cloud configs already uses "ln -sf". Signed-off-by: itxaka-agent <itxaka-agent@users.noreply.github.com>
1916453 to
acad3ef
Compare

Fixes: #835
What
Some Kairos targets never got the
systemd-resolveddracut module added to their initramfs, so DNS never resolved that early in boot β the "no DNS at initramfs stage" half of #835 (the other half, thedns:cloud-config stage onsystemd-resolvedhosts, lives inmudler/yipand is out of scope here; see the takeover comment on the issue).kairos-init/pkg/stages/steps_init.gonow addssystemd-resolvedto the dracut network-module list whereversystemd-networkddrives the initramfs and the module is actually available on the build root (both thesystemd-resolveddaemon binary andresolvectlpresent, matching what the module's owncheck()requires). This closes the gap for Ubuntu 21.04β22.04*, Debian, and openSUSE/SLES.* Ubuntu 22.04 is not fixed by this PR. Its packaged dracut (051, across every jammy suite) predates the upstream
systemd-resolveddracut module, which only landed at dracut 054. No installable package closes this gap today; that's documented in a code comment rather than silently left as a mystery or forced (forcing an unavailable module makes dracut abort the whole image build β see below).Also fixed along the way: the module-availability probe originally checked only the
systemd-resolveddaemon binary. The module's owncheck()requiresresolvectltoo, and dracut hard-aborts the entire image build (no initramfs produced) when a module forced viaadd_dracutmodulesfails itscheck(). Left unchanged, on a root with the daemon but notresolvectl, this fix would have turned "missing DNS" into "build fails outright" β worse than the original bug. The probe now checks both binaries.The RedHat family (outside Fedora-with-networkd) and Ubuntu β€20.04 are deliberately left alone: their dracut modules (
network-manager,network/network-legacy) already write/etc/resolv.confthemselves, so they already have working DNS in the initramfs.Verification
Unit tests cover the module-selection logic (table-driven,
kairos-init/pkg/stages/steps_init_test.go) against both fabricated build roots and facts confirmed against real, published Kairos container images (quay.io/kairos/core-*) and the real Ubuntu package archive for the jammy-dracut-version claim. No ISO was built and no VM was booted for this ticket β the change is internal to kairos-init's build-time dracut module selection, with no existing isolated repro short of the full image-build pipeline.Full round-by-round audit trail (what each review round found, and how each finding was resolved or empirically verified): #835 (comment)