From: Yu Watanabe Date: Mon, 29 Sep 2025 12:58:36 +0000 (+0900) Subject: mkosi: avoid infinite reboot on failure X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d526ab8a9aa74798e453dabf8c55636305238110;p=thirdparty%2Fsystemd.git mkosi: avoid infinite reboot on failure 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. --- 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 index 00000000000..7183952c9bf --- /dev/null +++ b/mkosi/mkosi.extra.common/usr/lib/systemd/system/systemd-pcrphase-factory-reset.service.d/exit-on-failure.conf @@ -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 index 00000000000..7183952c9bf --- /dev/null +++ b/mkosi/mkosi.extra.common/usr/lib/systemd/system/systemd-storagetm.service.d/exit-on-failure.conf @@ -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 index 00000000000..7183952c9bf --- /dev/null +++ b/mkosi/mkosi.extra.common/usr/lib/systemd/system/systemd-validatefs@.service.d/exit-on-failure.conf @@ -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 index 00000000000..7183952c9bf --- /dev/null +++ b/mkosi/mkosi.extra/usr/lib/systemd/system/systemd-pcrfs-root.service.d/exit-on-failure.conf @@ -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 index 00000000000..7183952c9bf --- /dev/null +++ b/mkosi/mkosi.extra/usr/lib/systemd/system/systemd-pcrfs@.service.d/exit-on-failure.conf @@ -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 index 00000000000..7183952c9bf --- /dev/null +++ b/mkosi/mkosi.extra/usr/lib/systemd/system/systemd-pcrphase-sysinit.service.d/exit-on-failure.conf @@ -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 index 00000000000..7183952c9bf --- /dev/null +++ b/mkosi/mkosi.extra/usr/lib/systemd/system/systemd-pcrphase.service.d/exit-on-failure.conf @@ -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 index 00000000000..7183952c9bf --- /dev/null +++ b/mkosi/mkosi.images/initrd/mkosi.extra/usr/lib/systemd/system/systemd-pcrphase-initrd.service.d/exit-on-failure.conf @@ -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 index 00000000000..7183952c9bf --- /dev/null +++ b/mkosi/mkosi.images/initrd/mkosi.extra/usr/lib/systemd/system/systemd-pcrphase-storage-target-mode.service.d/exit-on-failure.conf @@ -0,0 +1,2 @@ +[Unit] +FailureAction=exit