Martin Wilck [Wed, 26 Feb 2025 13:59:44 +0000 (14:59 +0100)]
fix(iscsi): make sure services are shut down when switching root
When systemd prepares switching root, it starts 'initrd-cleanup.service',
which runs 'systemctl --no-block isolate initrd-switch-root.target'.
This will stop all units on which initrd-switch-root.target does not
depend, including iscsid.service and iscsiuio.service. But systemd
doesn't guarantee a time ordering in this case. It can happen that
systemd switches root (i.e. restarts itself on the new root) before
iscsiuio is actually stopped, or at least before PID 1 receives
the notification that it has stopped. In this case, it considers
iscsiuio still running, and will not start it later in the boot
sequence when iscsid is coming up.
A typical log excerpt with systemd.log_level=debug looks like this:
When iscsid is started later on in the real root, it resets all existing iSCSI
connections, causing the root FS to come offline. In iSCSI offload scenarios
if iscsiuio is already running, it will re-establish the session after a few
seconds. But if iscsiuio has not been started at this point in time, it can't
be loaded any more from the root FS, and booting fails.
To avoid this problem, add "Conflicts" and a "Before" dependencies against
initrd-cleanup.service to the iSCSI service units.
See also https://github.com/systemd/systemd/issues/3436
Martin Wilck [Wed, 26 Feb 2025 13:54:51 +0000 (14:54 +0100)]
fix(iscsi): don't require network setup for qedi
This adds the logic of cc2c48a ("fix(iscsi): don't require network setup
for bnx2i") for the qedi iSCSI offload driver. Testing has shown
that for qedi, network setup in the initrd is even more superfluous
as it is for bnx2i. qedi devices are usually separate PCI functions
that don't show up as ethernet interfaces at all.
Benjamin Drung [Fri, 21 Feb 2025 22:49:04 +0000 (23:49 +0100)]
fix(systemd-sysusers): silence "Creating " on stderr
dracut prints 20 lines when creating users and groups even with
`--quiet` option. Sample output:
```
Creating group 'nobody' with GID 65534.
Creating group 'audio' with GID 997.
Creating group 'disk' with GID 995.
Creating group 'input' with GID 994.
Creating group 'kmem' with GID 993.
Creating group 'kvm' with GID 992.
Creating group 'lp' with GID 991.
Creating group 'optical' with GID 990.
Creating group 'render' with GID 989.
Creating group 'sgx' with GID 988.
Creating group 'storage' with GID 987.
Creating group 'tty' with GID 5.
Creating group 'uucp' with GID 986.
Creating group 'video' with GID 985.
Creating group 'users' with GID 984.
Creating group 'systemd-journal' with GID 983.
Creating user 'root' (Super User) with UID 0 and GID 0.
Creating user 'nobody' (Kernel Overflow User) with UID 65534 and GID 65534.
Creating group 'nobody' with GID 65534.
Creating group 'audio' with GID 997.
```
Filter "Creating " messages from stderr, but keep the other messages on
stderr and all messages on stdout untouched.
Fixes: https://github.com/dracut-ng/dracut-ng/issues/1195 Fixes: f3dacc013d90 ("feat(systemd-sysusers): run systemd-sysusers as part of the build process")
You-Sheng Yang [Wed, 22 Jan 2025 15:37:53 +0000 (23:37 +0800)]
fix(dracut-install): install compressed blobs that match wildcard fwpath
dracut-install tries to invoke `glob()` with full path expanded from
"intel/ish/ish_*.bin", but while all the binaries were compressed, this
matches no file and none of the custom ISH firmware blobs will be
installed.
Closes: #1150
Bug-Ubuntu: https://bugs.launchpad.net/bugs/2095518 Signed-off-by: You-Sheng Yang <vicamo.yang@canonical.com>
Benjamin Drung [Wed, 12 Feb 2025 10:10:30 +0000 (11:10 +0100)]
fix(dracut-lib): support "set -e" in setdebug
A `return` statement will return with the exit code of the previous
command if no exit code is specified. In case `/usr/lib/initrd-release`
does not exist, `setdebug` will return with the exit code 1.
Return this function with code 0 in that case to support `set -e` users.
Fixes: 2b125c69cc80 ("base/dracut-lib.sh: do not setdebug, if not in initramfs")
Laszlo Gombos [Sat, 8 Feb 2025 01:48:42 +0000 (20:48 -0500)]
fix(release): tagging and release generation is no longer automated
Create release commit on relese branch automatically, but leave the
rest of the release creation process up to the project admins to
allow manual review and intervention.
We do not have a valid email address for the release automation,
so let's make it obvious that it is just a placeholder email address.
Benjamin Drung [Fri, 7 Feb 2025 18:35:35 +0000 (19:35 +0100)]
test(FULL-SYSTEMD): skip systemd-network-management if missing
The Debian/Ubuntu package runs the FULL-SYSTEMD test without
dracut-network installed. Therefore the test fails due to the missing
`systemd-network-management` module:
```
TEST: Full systemd serialization/deserialization test with /usr mount
dracut[E]: Module 'systemd-network-management' cannot be found.
```
Fixes: 75f3a191b675 ("test(FULL-SYSTEMD): when systemd-networkd is available, install it")
Benjamin Drung [Tue, 11 Feb 2025 11:57:34 +0000 (12:57 +0100)]
test: ignore shellcheck for disk_index
shellcheck complains about `disk_index` for appearing to be unused, but
this variable is used in `qemu_add_drive`. So ignore those shellcheck
complaints.
Jo Zzsi [Mon, 27 Jan 2025 00:24:05 +0000 (19:24 -0500)]
test(KERNEL-INSTALL): include generating and testing rescue boot
Make sure kernel-install generates the regular hostonly initrd and
the rescue (non-hostonly) initrd as well.
It is not necessary recommended for distributions to follow this
test case, in fact rescue (non-hostonly) initrd is not enabled by
default, but this is a very convinient way on the CI to test
both configuration and avoid regressions going forward.
Jo Zzsi [Sun, 26 Jan 2025 01:53:55 +0000 (20:53 -0500)]
test(KERNEL-INSTALL): enable for all CI container
Add preconditions, which would skip this test on
Debian/Ubuntu for now.
Move enviroment variables - such as BOOT_ROOT - out
from the test specific code to the common test infrastrucutre
so that it is available for all test cases.
Jo Zzsi [Fri, 24 Jan 2025 14:08:15 +0000 (09:08 -0500)]
ci: rename test-github to test-container
test-container better reflects that this scripts is meant to
install and run dracut in container and not restricted to be used
as part of GitHub Actions.
Also add a safety check to make sure that the script gets executed
inside a container and not on a host.
Martin Wilck [Fri, 16 Aug 2024 21:03:22 +0000 (23:03 +0200)]
fix(iscsi): attempt iSCSI login before all interfaces are up
When booting from iSCSI, we don't need to wait for retries until all network
interfaces are up. We can just attempt to activate iSCSI on those interfaces
that are currently up (in the offload case like bnx2i, we can even try without
any network interfaces). If the root fs is found, we can go on booting;
otherwise, the iscsiroot script will be called again later anyway.
Martin Wilck [Fri, 16 Aug 2024 20:33:18 +0000 (22:33 +0200)]
fix(iscsi): don't require network setup for bnx2i
The bnx2i iSCSI transport doesn't require networking to be set up in order to
bring up iSCSI connections. Quite to the contrary, trying to bring up the
network may actually disturb the iSCSI connection. This holds in particular
for bnx2i device with NPAR (network partitioning) support, where a given
network interface can be used for both iSCSI and regular networking. Setting
certain network parameters like MTU on the network side can fatally disrupt
an existing iSCSI connection. Even if this does not happen, trying to bring
up the regular network interfaces is pointless because iSCSI won't be enabled
over regular TCP/IP anyway. Trying to bring up the network interfaces and
possibly failing delays booting unecessarily and may cause timeout, without
benefit.
Detect the bnx2i offload module at setup time and communicate it to
parse-iscsiroot.sh using a new parameter, "rd.iscsi.transport". It's currently
only effective for bnx2i. It might be useful for other transports as well,
but we haven't been able to test the other transports as thoroughly as bnx2i.
Jo Zzsi [Fri, 17 Jan 2025 16:47:25 +0000 (11:47 -0500)]
ci: build arm64 containers for all non-extra containers
Now that GitHub Actions provide the facility to build
arm64 containers nativly, the project can afford building
all CI containers for arm64 that supports it.
Jo Zzsi [Sun, 12 Jan 2025 23:33:12 +0000 (18:33 -0500)]
fix(systemd-sysuser): add support for Gentoo
systemd-sysuser dracut module uses inst_sysusers function
to install configuration files. These configuration files are
named differently in Gentoo, which impacts upstream Gentoo CI
as well.
Based on Gentoo downstream patch
https://github.com/gentoo/gentoo/blob/master/sys-kernel/dracut/files/dracut-103-acct-user-group-gentoo.patch
by Nowa Ammerlaan <nowa@gentoo.org>
Jo Zzsi [Mon, 13 Jan 2025 01:01:09 +0000 (20:01 -0500)]
fix(systemd-ask-password): do not half-install systemd-ask-password-wall
Do not install the path unit when the service unit is not installed
for systemd-ask-password-wall.
Fixes the following warning on the CI:
[FAILED] Failed to start Forward Password Requests to Wall Directory Watch.
See 'systemctl status systemd-ask-password-wall.path' for details.
...
systemd[1]: systemd-ask-password-wall.path: Refusing to start, unit systemd-ask-password-wall.service to trigger not loaded.
systemd[1]: Failed to start Forward Password Requests to Wall Directory Watch.
Jo Zzsi [Sun, 12 Jan 2025 22:48:52 +0000 (17:48 -0500)]
test(FULL-SYSTEMD): support both dbus-broker and dbus-daemon
All CI containers should be able to test the following dracut
modules, so no check is needed
- systemd-hostnamed
- systemd-portabled
- systemd-timedated
- systemd-network-management