teknoraver / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone

Blame SOURCES/0502-units-make-sure-initrd-cleanup.service-terminates-be.patch

21255d
From ea425381a675a2ce4d9519d534fe27c1012ac92e Mon Sep 17 00:00:00 2001
21255d
From: Franck Bui <fbui@suse.com>
21255d
Date: Mon, 28 Jan 2019 12:07:37 +0100
21255d
Subject: [PATCH] units: make sure initrd-cleanup.service terminates before
21255d
 switching to rootfs
21255d
21255d
A follow-up for commit a8cb1dc3e0fa81aff.
21255d
21255d
Commit a8cb1dc3e0fa81aff made sure that initrd-cleanup.service won't be stopped
21255d
when initrd-switch-root.target is isolated.
21255d
21255d
However even with this change, it might happen that initrd-cleanup.service
21255d
survives the switch to rootfs (since it has no ordering constraints against
21255d
initrd-switch-root.target) and is stopped right after when default.target is
21255d
isolated. This led to initrd-cleanup.service entering in failed state as it
21255d
happens when oneshot services are stopped.
21255d
21255d
This patch along with a8cb1dc3e0fa81aff should fix issue #4343.
21255d
21255d
Fixes: #4343
21255d
(cherry picked from commit e2c7c94ea35fe7e669afb51bfc2251158b522ea5)
21255d
21255d
Related: #1657810
21255d
---
21255d
 units/initrd-switch-root.target | 2 +-
21255d
 1 file changed, 1 insertion(+), 1 deletion(-)
21255d
21255d
diff --git a/units/initrd-switch-root.target b/units/initrd-switch-root.target
21255d
index ad82245121..ea4f02618f 100644
21255d
--- a/units/initrd-switch-root.target
21255d
+++ b/units/initrd-switch-root.target
21255d
@@ -15,4 +15,4 @@ Requires=initrd-switch-root.service
21255d
 Before=initrd-switch-root.service
21255d
 AllowIsolate=yes
21255d
 Wants=initrd-udevadm-cleanup-db.service initrd-root-fs.target initrd-fs.target systemd-journald.service initrd-cleanup.service
21255d
-After=initrd-udevadm-cleanup-db.service initrd-root-fs.target initrd-fs.target emergency.service emergency.target
21255d
+After=initrd-udevadm-cleanup-db.service initrd-root-fs.target initrd-fs.target emergency.service emergency.target initrd-cleanup.service