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.
Jo Zzsi [Tue, 12 Nov 2024 12:08:12 +0000 (07:08 -0500)]
ci: switch from musl:openrc to glibc:openrc
The goal is to test some common non-systemd configuration.
glibc:openrc is probably a better option for this goal, and
GitHub Action (node) fails to run tests on the Gentoo based musl container.
fix(dracut): rework timeout for devices added via --mount and --add-device
Currently, dracut adds a systemd dropin that sets an infinite timeout _only_ for
the underlying persistent devices of each host device that must be active in the
initrd. E.g.:
```
sh-5.2# systemctl show --property JobRunningTimeoutUSec /dev/disk/by-uuid/0d1b24c2-f112-48ef-8442-1001cffc92f0
JobRunningTimeoutUSec=infinity
sh-5.2# systemctl show --property JobRunningTimeoutUSec /dev/sda1
JobRunningTimeoutUSec=1min 30s
```
This can cause a problem if a user application expects to mount /dev/sda1 in the
initrd (that's why it was explicitly added `--mount "/dev/sda1 ..."`), but for
some reason the link is not created within 1min 30s.
Jo Zzsi [Sat, 9 Nov 2024 11:07:16 +0000 (06:07 -0500)]
ci(gentoo): optimize container
Combine some container layers.
Allows to opt-out of optional packages.
Splitting the package installation into two bigger layers allows
the container runtime to download them in parallel.
Nowa Ammerlaan [Fri, 8 Nov 2024 19:01:54 +0000 (20:01 +0100)]
fix(dracut-functions.sh): check for modules in --kmoddir, not in --sysroot
Modules are installed from the directory specified by --kmoddir, but currently
the check_kernel_module() function is checking for the module in
--sysroot/lib/modules. This is notably not the same when kernels packages are
being built inside some docker container. We should check for the modules
existence in the directory we are actually going to install it from.