Repository navigation
fix(kairos-init): install the iSCSI initiator on the Red Hat family - #4740
Conversation
|
The red qemu matrix here is master, not this PR: the same 18 jobs fail on master run 35345388402 and this branch only touches kairos-init. Tracked in #4743. |
|
Picking this up for QA. |
QA Result: PASS
What the baseline does (master-built Rocky 9 ISO, live boot): What the PR does, installed to disk and booted from disk: The three impacts in #4739, each checked separately:
Scope and regressions:
One unrelated observation, not caused by this PR and not present on the baseline path being tested here: the installed node still logs Summary: The Red Hat family now ships the iSCSI initiator. The boot-time enable succeeds, the dracut module is included, and an iSCSI volume attaches and carries a filesystem on a real installed Rocky 9 node, none of which works on a master-built image. No change to any other family or to riscv64. |
|
Retriggered with a close/reopen. The 09-18 matrix went red on every flavor including ubuntu-20 and leap, which this Red Hat package map cannot touch, and that run's log and artifact blobs now 403 on age, so a fresh run is the only way to see what failed. |
|
Picking this up for QA. Re-QA: this PR was moved back into QA at 06:04 UTC today, after my 09-18 PASS and after the close/reopen that retriggered CI. Head is unchanged at |
QA Result: PASS
Re-QA of the same head as my 2026-09-18 PASS, so this run re-checked it against master as it is today and against the artifact CI actually publishes. Image A/B, same Dockerfile, same base, only kairos-init differs:
The published kairos-init binaries agree: Installed node, booted from disk after an autoinstall from the PR ISO:
Real iSCSI attach from that node to a 128 MiB file-backed Scope, Tests: On the CI retrigger. The close/reopen created run Unchanged from last cycle and unrelated: the installed node still logs Summary: The Red Hat family ships the iSCSI initiator, the boot-time enable succeeds with zero failed units, the dracut module is included, and an iSCSI volume attaches and carries a filesystem on a real installed Rocky 9 node. None of that works on a master-built image, and nothing else in the package map moves. The fresh CI run is blocked on the workflow approval gate, not on this change. |
`09_systemd_services.yaml` enables `iscsid` in the initramfs stage of every
systemd image. The Debian, SUSE and Alpine families all install `open-iscsi`,
and the Red Hat family installed nothing: the RPM is called
`iscsi-initiator-utils`, and no package map named it.
Streaming both layers of the published v3.7.2 amd64 rootfs shows the gap is
real, not a naming difference in the image:
rockylinux:9-core no iscsid, no iscsiadm, no iscsid.service, no /etc/iscsi
fedora:40-core the same
debian:13-core usr/sbin/iscsid, usr/lib/systemd/system/iscsid.service
opensuse:leap-15.6 sbin/iscsid, usr/lib/systemd/system/iscsid.service
On Rocky and Fedora the only matches are kernel modules and dracut's own
95iscsi module, which `require_binaries iscsiadm` and is therefore skipped.
Three consequences, in increasing order of how much they matter. The enable
fails on every boot, which `run-stage` swallows. Booting from an iSCSI root is
impossible. And iSCSI backed storage does not work at all: Longhorn and
Portworx both need `iscsiadm` and a running `iscsid` in the host namespace,
while `00_rootfs.yaml` persists `/etc/iscsi`, `/var/lib/longhorn` and
`/etc/pwx` for exactly that case.
Listed per architecture rather than under `ArchCommon` because the package
cannot be confirmed for Fedora riscv64 from here, the same reason
`open-vm-tools` is split that way for the SUSE family. These two arches cover
every published Red Hat family Kairos image, and CI's
`build-iso / amd64-core-rocky-9` job checks the amd64 half on every pull
request.
The guard reads the unit list out of the cloud-config instead of retyping it,
so adding a unit there reaches the spec, and it maps each unit to its package
per family rather than assuming the two share a name.
Fixes kairos-io#4739
Signed-off-by: Ettore Di Giacinto <mudler@kairos.io>
d69bbaa to
cca6209
Compare
Fixes #4739
kairos-init/pkg/bundled/cloudconfigs/09_systemd_services.yamlenablesiscsidin the
initramfsstage of every systemd image. The Debian, SUSE and Alpinefamilies all install
open-iscsifor it. The Red Hat family installed nothing:the RPM is called
iscsi-initiator-utils, and no package map named it.The gap is in the shipped images, measured
Streamed both layers of the published
v3.7.2amd64 rootfs of four flavors andlisted every path matching
iscsi:iscsid/iscsiadmiscsid.service/etc/iscsikairos/rockylinux:9-core-amd64-generic-v3.7.2kairos/fedora:40-core-amd64-generic-v3.7.2kairos/debian:13-core-amd64-generic-v3.7.2usr/sbin/iscsidkairos/opensuse:leap-15.6-core-amd64-generic-v3.7.2sbin/iscsidOn Rocky and Fedora the only matches are kernel modules and dracut's own
95iscsimodule, whichrequire_binaries iscsiadmand is therefore skipped.Why it matters
The failing
systemctl enableis the least of it, sincerun-stageisnon-strict and swallows it. Booting from an iSCSI root on a Red Hat-family image
is impossible. And iSCSI-backed storage does not work at all: Longhorn and
Portworx both need
iscsiadmand a runningiscsidin the host namespace,while
00_rootfs.yamlpersists/etc/iscsi,/var/lib/longhornand/etc/pwxfor exactly that case.
The intent is already in the tree elsewhere.
RedHatFamilyinstallsdevice-mapper-multipathandnfs-utilsfor storage parity, #3670 asked foropen-iscsiand it was added to Hadron in kairos-io/hadron#59, andkairos-init/pkg/stages/steps_init.go:1130says the enable exists so that "thepost-boot iscsid service stays enabled for anyone actually using iSCSI storage".
Scope of the package entry
ArchAMD64andArchARM64, notArchCommon. Every RPM mirror is unreachablefrom where I work, so I cannot confirm the package exists for Fedora riscv64,
and guessing an entry there is how a build breaks for one arch only. Those two
arches cover every published Red Hat-family Kairos image. This mirrors how
open-vm-toolsis already split for the SUSE family.CI's
build-iso / amd64-core-rocky-9job builds fromrockylinux/rockylinux:9on every pull request, so the amd64 half is checked here.
test-core-rocky-9then boots it.
Test
kairos-init/pkg/validation/cloudconfigs_systemd_services_test.goreads theunit list out of the cloud-config rather than retyping it, so adding a unit
there reaches the spec, and maps each unit to its package per family rather than
assuming the unit and the package share a name (they do for
logrotate, they donot for the iSCSI initiator).
Mutation-checked both halves separately:
fedora/amd64 installs no iscsi-initiator-utils, but 09_systemd_services.yaml enables iscsid on every bootArchAMD64entry:fedora/arm64 installs no iscsi-initiator-utils, ...ok github.com/kairos-io/kairos/v4/kairos-init/pkg/validationgo test ./kairos-init/...passes,gofmtandgolangci-lintare clean on thetwo touched packages.
Not verified by a boot. This changes the package list, not the boot path, and
the Rocky leg of the ISO build plus
test-core-rocky-9cover it in CI.AI was used to write this change. No human has read it yet.