]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
mkosi: avoid infinite reboot on failure
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 29 Sep 2025 12:58:36 +0000 (21:58 +0900)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 13 Oct 2025 08:29:38 +0000 (10:29 +0200)
If systemd-pcrphase-initrd.service and friends failed for some reasons,
the test VM will reboot infinitely and the test will timeout. Let's
propagate the failure to the host and fail the test earlier in that case.

mkosi/mkosi.extra.common/usr/lib/systemd/system/systemd-pcrphase-factory-reset.service.d/exit-on-failure.conf [new file with mode: 0644]
mkosi/mkosi.extra.common/usr/lib/systemd/system/systemd-storagetm.service.d/exit-on-failure.conf [new file with mode: 0644]
mkosi/mkosi.extra.common/usr/lib/systemd/system/systemd-validatefs@.service.d/exit-on-failure.conf [new file with mode: 0644]
mkosi/mkosi.extra/usr/lib/systemd/system/systemd-pcrfs-root.service.d/exit-on-failure.conf [new file with mode: 0644]
mkosi/mkosi.extra/usr/lib/systemd/system/systemd-pcrfs@.service.d/exit-on-failure.conf [new file with mode: 0644]
mkosi/mkosi.extra/usr/lib/systemd/system/systemd-pcrphase-sysinit.service.d/exit-on-failure.conf [new file with mode: 0644]
mkosi/mkosi.extra/usr/lib/systemd/system/systemd-pcrphase.service.d/exit-on-failure.conf [new file with mode: 0644]
mkosi/mkosi.images/initrd/mkosi.extra/usr/lib/systemd/system/systemd-pcrphase-initrd.service.d/exit-on-failure.conf [new file with mode: 0644]
mkosi/mkosi.images/initrd/mkosi.extra/usr/lib/systemd/system/systemd-pcrphase-storage-target-mode.service.d/exit-on-failure.conf [new file with mode: 0644]

diff --git a/mkosi/mkosi.extra.common/usr/lib/systemd/system/systemd-pcrphase-factory-reset.service.d/exit-on-failure.conf b/mkosi/mkosi.extra.common/usr/lib/systemd/system/systemd-pcrphase-factory-reset.service.d/exit-on-failure.conf
new file mode 100644 (file)
index 0000000..7183952
--- /dev/null
@@ -0,0 +1,2 @@
+[Unit]
+FailureAction=exit
diff --git a/mkosi/mkosi.extra.common/usr/lib/systemd/system/systemd-storagetm.service.d/exit-on-failure.conf b/mkosi/mkosi.extra.common/usr/lib/systemd/system/systemd-storagetm.service.d/exit-on-failure.conf
new file mode 100644 (file)
index 0000000..7183952
--- /dev/null
@@ -0,0 +1,2 @@
+[Unit]
+FailureAction=exit
diff --git a/mkosi/mkosi.extra.common/usr/lib/systemd/system/systemd-validatefs@.service.d/exit-on-failure.conf b/mkosi/mkosi.extra.common/usr/lib/systemd/system/systemd-validatefs@.service.d/exit-on-failure.conf
new file mode 100644 (file)
index 0000000..7183952
--- /dev/null
@@ -0,0 +1,2 @@
+[Unit]
+FailureAction=exit
diff --git a/mkosi/mkosi.extra/usr/lib/systemd/system/systemd-pcrfs-root.service.d/exit-on-failure.conf b/mkosi/mkosi.extra/usr/lib/systemd/system/systemd-pcrfs-root.service.d/exit-on-failure.conf
new file mode 100644 (file)
index 0000000..7183952
--- /dev/null
@@ -0,0 +1,2 @@
+[Unit]
+FailureAction=exit
diff --git a/mkosi/mkosi.extra/usr/lib/systemd/system/systemd-pcrfs@.service.d/exit-on-failure.conf b/mkosi/mkosi.extra/usr/lib/systemd/system/systemd-pcrfs@.service.d/exit-on-failure.conf
new file mode 100644 (file)
index 0000000..7183952
--- /dev/null
@@ -0,0 +1,2 @@
+[Unit]
+FailureAction=exit
diff --git a/mkosi/mkosi.extra/usr/lib/systemd/system/systemd-pcrphase-sysinit.service.d/exit-on-failure.conf b/mkosi/mkosi.extra/usr/lib/systemd/system/systemd-pcrphase-sysinit.service.d/exit-on-failure.conf
new file mode 100644 (file)
index 0000000..7183952
--- /dev/null
@@ -0,0 +1,2 @@
+[Unit]
+FailureAction=exit
diff --git a/mkosi/mkosi.extra/usr/lib/systemd/system/systemd-pcrphase.service.d/exit-on-failure.conf b/mkosi/mkosi.extra/usr/lib/systemd/system/systemd-pcrphase.service.d/exit-on-failure.conf
new file mode 100644 (file)
index 0000000..7183952
--- /dev/null
@@ -0,0 +1,2 @@
+[Unit]
+FailureAction=exit
diff --git a/mkosi/mkosi.images/initrd/mkosi.extra/usr/lib/systemd/system/systemd-pcrphase-initrd.service.d/exit-on-failure.conf b/mkosi/mkosi.images/initrd/mkosi.extra/usr/lib/systemd/system/systemd-pcrphase-initrd.service.d/exit-on-failure.conf
new file mode 100644 (file)
index 0000000..7183952
--- /dev/null
@@ -0,0 +1,2 @@
+[Unit]
+FailureAction=exit
diff --git a/mkosi/mkosi.images/initrd/mkosi.extra/usr/lib/systemd/system/systemd-pcrphase-storage-target-mode.service.d/exit-on-failure.conf b/mkosi/mkosi.images/initrd/mkosi.extra/usr/lib/systemd/system/systemd-pcrphase-storage-target-mode.service.d/exit-on-failure.conf
new file mode 100644 (file)
index 0000000..7183952
--- /dev/null
@@ -0,0 +1,2 @@
+[Unit]
+FailureAction=exit