Jo Zzsi [Thu, 26 Dec 2024 13:51:53 +0000 (08:51 -0500)]
feat(crypt): remove empty /etc/crypttab to allow creating it later
crypt module should not install an empty /etc/crypttab in hostonly mode.
Some distributions ship with an /etc/crypttab without entries (just
with comments). In those distributions installing /etc/crypttab
as part of --install command line option in hostonly mode would not
work as expected.
Jo Zzsi [Tue, 10 Dec 2024 19:11:13 +0000 (14:11 -0500)]
fix(systemd-tmpfiles): copy 20-systemd-stub.conf into the initrd
Some of the tmpfiles to be managed during initrd phase are now
described in a separate tmpfiles.d snippet, see
https://github.com/systemd/systemd/commit/408ab988dbf6723871afd3503d11bd0deb50f846
Benjamin Drung [Fri, 22 Nov 2024 23:44:39 +0000 (00:44 +0100)]
test: do not require a kernel for --clean
The make `clean` target is called during Debian/Ubuntu package build in
an environment that does not have a kernel installed. It fails to set
`VMLINUZ`.
Move the code that sets `KVERSION` and `VMLINUZ` into helper functions
and only call them in case `--clean` is not called.
Benjamin Drung [Fri, 22 Nov 2024 23:52:57 +0000 (00:52 +0100)]
ci: release Dracut quarterly
Release Dracut quarterly to synchronize the Dracut release with the
Ubuntu release. Ubuntu XX.04 has its feature freeze mid to end of
February. Ubuntu XX.10 has its feature freeze mid to end of August. So
release Dracut on the beginning of February and August to have some time
left to get it landed in the distribution.
fix(35network-manager): install nft binary during module installation
NetworkManager has a new bonding mode called balance-slb. This mode is
used in environments where NICs are connected to switches without LACP.
In order to work, NetworkManager configures a set of nftables rules.
The 'nft' binary is required to work.
Signed-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net>
Benjamin Drung [Fri, 22 Nov 2024 02:56:26 +0000 (03:56 +0100)]
fix(iscsi): remove duplicate inst_multiple calls for iscsiadm and iscsid
The iscsiadm and iscsid binaries are installed by an `inst_multiple` two
times when using the systemd module. Remove the already installed
binaries from the second call.
Fixes: b31f3fe0d1be ("95iscsi: Replace iscsistart with iscsid")
Benjamin Drung [Wed, 20 Nov 2024 16:59:51 +0000 (17:59 +0100)]
fix(iscsi): include /usr/lib/open-iscsi/startup-checks.sh if needed
On Debian/Ubuntu iscsid.service (from open-iscsi 2.1.10-1) fails to
start in the initrd, because its `ExecStartPre` script is not included
in the initrd:
The upstream open-iscsi project ships an `iscsid.service` [1] that does not
have an `ExecStartPre` entry, but Debian/Ubuntu uses their own service
file [2].
The TEST-70-ISCSI test will succeed on Ubuntu 25.04 (plucky) with
open-iscsi 2.1.10-1ubuntu2 (see https://launchpad.net/bugs/2072484).
Jo Zzsi [Wed, 20 Nov 2024 01:15:03 +0000 (20:15 -0500)]
fix(shell-interpreter): move later in the module ordering
This PR ensures that shell dependencies (e.g. on bash) is
computed before shell-interpreter gets executed.
Do not explicitly depend on shell-interpreter as this would trigger
calling the shell-interpreter depend() function too
early in the model evaluation process.
The impact of this PR can be observed in the BASIC test when
running on void CI containers. Before this PR both 'dash' and
'bash' dracut modules gets included in the initrd.
After the PR only the 'bash' module gets included in the initrd.
David Härdeman [Thu, 21 Nov 2024 08:36:48 +0000 (09:36 +0100)]
fix(plymouth): change severity of shutdown log messages
Right now, if someone is using plymouth and the "quiet" boot parameter,
odds are that they do so in the hope of a more polished boot experience.
The shutdown module prints a couple of warnings and then shuts down
plymouth, meaning that these warnings will flash briefly on screen
before the actual reboot/shutdown.
None of the warnings qualify as warnings though:
1. Printing "Unmounted /oldroot" just means that unmounting /oldroot
(an internal implementational detail) succeeded.
2. Printing "Killing all remaining processes" hardly qualifies as a
warning since it's a quite expected result of a reboot.
So downgrade them to "info" (which will respect the "quiet" boot
parameter), leading to a nice, quiet reboot.
Jo Zzsi [Wed, 20 Nov 2024 12:23:02 +0000 (07:23 -0500)]
ci: remove dracut modules from the ci containers that are being tested
As an example, when a module ordering gets changed, without this PR
the module would be available twice under modules.d - once with the
old order number that gets installed with the package manager and
once with the new order number that gets overlaid.
Benjamin Drung [Tue, 19 Nov 2024 23:31:19 +0000 (00:31 +0100)]
fix(docs): correct spelling mistake of recommended
Fixes: eb1ae6c4f836 ("docs: warn against the usage of -m, -o, -d") Fixes: f6983159fa0b ("docs: warn against the usage of omit, drivers, dracutmodules")
Benjamin Drung [Tue, 19 Nov 2024 16:50:00 +0000 (17:50 +0100)]
test: print all server startup logs in V=1 or V=2 mode
In V=0 mode only print "Waiting for the server to startup" once and do
not print anything from the server startup logs.
In V=1 and V=2 print all lines from the server startup while waiting
for the server to be ready to ease debugging (e.g. when the kernel
crashes the last 10 lines will not be enough).
Ian Wienand [Tue, 19 Nov 2024 04:24:55 +0000 (15:24 +1100)]
docs: update formatting of dracut.conf man page
This updates a few things in the dracut.conf man page.
Firstly I've dedented the definition lists. This isn't just for fun, the
indent works but becomes unwiedly when trying to use paragraphs or do things
like correctly associate admonitions, because the obvious thing of
title:
blah
+
WARNING: warning
doesn't work for whatever magic parsing reasons; you have to dedent the "+".
Doing it consitently just looks neater.
I've been through and correctly added the existing admonitions so they're
associated with the definition they relate to. I've also put things into
paragraphs where they were getting too long, which I think improves clarity.
I've made a few other minor changes to formatting, mostly adding `` around
literal things, updating the debug table, some minor wording clarity things and
using =,== for titles as I think that much better visually represents the
level.
Benjamin Drung [Tue, 19 Nov 2024 02:32:43 +0000 (03:32 +0100)]
test: do not redirect /dev/null to stdin
The test cases have comments saying "Uncomment this to debug failures",
but uncommenting `DEBUGFAIL` is not enough. The initrd will not take any
keyboard presses, because /dev/null is redirected to stdin.
To ease debugging, do not redirect /dev/null to stdin.
Benjamin Drung [Mon, 18 Nov 2024 20:50:03 +0000 (21:50 +0100)]
test: fail test if server has terminated
The server might shutdown on error. When waiting for the server to
startup, check if the server QEMU process has vanished and abort the
test in that case.
Benjamin Drung [Fri, 15 Nov 2024 22:26:29 +0000 (23:26 +0100)]
test: include debug module in server only when debugging
Including the `debug` module in the server's dracut image is not needed
for the normal test case run. Only include it when the user sets
`SERVER_DEBUG` to debug the test case.
Benjamin Drung [Fri, 15 Nov 2024 20:42:21 +0000 (21:42 +0100)]
test(FULL-SYSTEMD): make systemd-pcrphase module optional
TEST-04-FULL-SYSTEMD fails on s390x:
```
dracut[E]: Module 'systemd-pcrphase' cannot be installed.
```
systemd ships `systemd-pcrphase.service` only on amd64, arm64, armhf,
riscv64 on Ubuntu and Debian. So make `systemd-pcrphase` an optional
modules in the test.
Jo Zzsi [Fri, 15 Nov 2024 16:38:05 +0000 (11:38 -0500)]
ci(fedora): add ignition
Ignition is a utility used to manipulate systems during the initramfs.
This includes partitioning disks, formatting partitions, writing files
(regular files, systemd units, etc.), and configuring users. On first
boot, Ignition reads its configuration from a source of truth (remote
URL, network metadata service, hypervisor bridge, etc.) and applies
the configuration.
This is an important out-of tree dracut module that
the upstream project should not regress.
Benjamin Drung [Fri, 15 Nov 2024 10:59:44 +0000 (11:59 +0100)]
test: replace qemu nic model e1000 by virtio
TEST-72-NBD fails on s390x with:
```
qemu-system-s390x: warning: hub port hub0port0 has no peer
qemu-system-s390x: warning: hub 0 with no nics
qemu-system-s390x: warning: netdev hub0port0 has no peer
qemu-system-s390x: warning: requested NIC (#net046, model e1000) was not created (not supported by this machine?)
```
The test uses the e1000 model, but s390x does not have it:
```
$ qemu-system-s390x -nic model=help
Available NIC models:
virtio
```
So replace the e1000 model by virtio, which is supported by most
architectures.
Jo Zzsi [Wed, 13 Nov 2024 15:30:48 +0000 (10:30 -0500)]
ci: increase GitHub Action timeout to 20 min
Sadly, the timeout includes not only the time it takes to
run the test, but also the time it takes to allocate a machine on
GitHub to run the job, which is unpredicatable.
Increase the timeout to account for this new information.
Benjamin Drung [Wed, 13 Nov 2024 11:59:38 +0000 (12:59 +0100)]
test: decrease default VM memory size to 1 GiB
Commit a0442b777820("test: increase VM memory size to pass test 40 on
more VMs") increased the VM memory from 1 to 2 GiB for TEST-72-NBD,
because the test ran out of memory on Arch and openSUSE.
Running the tests on armhf fails with:
```
qemu-system-armhf: at most 2047 MB RAM can be simulated
```
Decrease the default memory back to 1 GiB. Dracut should work on systems
and VMs with not much memory.
Jo Zzsi [Sun, 3 Nov 2024 12:29:40 +0000 (07:29 -0500)]
ci: combine Debian/Ubuntu into the same dockerfile
This PR does not change the test covergae or the number of CI
containers. It simply combines the dockerfile to easy maitenance
and remove duplicated code.
George Mileka [Thu, 25 Jan 2024 23:06:13 +0000 (15:06 -0800)]
feat(dmsquash-live): add support for rd.live.overlay.nouserconfirmprompt
Dracut allows the creation of a LiveOS using a read-only squashfs and
a read-write overlay on top.
If the read-write overlay is backed by a ramdisk, Dracut halts and prompts
the user to confirm whether to continue or not.
This interaction during the boot process is not desired in all cases.
This change introduces a new flag (rd.live.overlay.nouserconfirmprompt)
that when defined, it suppresses the prompt and allows the boot process
to continue to completion without user interation.
There is no impact to existing configurations and their associated behavior.
The new behavior only takes effect only when the new switch is explicitly
defined by the image build as a kernel parameter.