Blame SOURCES/0110-multipath-fix-systemd-timers-in-the-initramfs.patch

8b67ad
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
8b67ad
From: Benjamin Marzinski <bmarzins@redhat.com>
8b67ad
Date: Fri, 5 Aug 2022 18:16:03 -0500
8b67ad
Subject: [PATCH] multipath: fix systemd timers in the initramfs
8b67ad
8b67ad
The systemd timers created for "find_multipaths smart" conflict with
8b67ad
shutdown.target, but not with initrd-cleanup.service.  This can make
8b67ad
these timers trigger after the inirtd has started shutting down,
8b67ad
restarting multipathd (which then stops initrd-cleanup.service, since it
8b67ad
conflicts).  To avoid this, make sure the timers and the unit they
8b67ad
trigger conflict with inird-cleanup.service. Also don't make them start
8b67ad
multipathd.  "multipath -u" will not return "maybe" if multipathd isn't
8b67ad
running or set to run, and since we no longer wait for udev-settle,
8b67ad
multipathd starts up pretty quickly, so it shouldn't be a problem to
8b67ad
not trigger it here.
8b67ad
8b67ad
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
8b67ad
Reviewed-by: Martin Wilck <mwilck@suse.com>
8b67ad
---
8b67ad
 multipath/multipath.rules | 2 +-
8b67ad
 1 file changed, 1 insertion(+), 1 deletion(-)
8b67ad
8b67ad
diff --git a/multipath/multipath.rules b/multipath/multipath.rules
8b67ad
index 0486bf70..68c30644 100644
8b67ad
--- a/multipath/multipath.rules
8b67ad
+++ b/multipath/multipath.rules
8b67ad
@@ -72,7 +72,7 @@ ENV{.SAVED_FM_WAIT_UNTIL}=="?*", GOTO="pretend_mpath"
8b67ad
 #
8b67ad
 # We must trigger an "add" event because LVM2 will only act on those.
8b67ad
 
8b67ad
-RUN+="/usr/bin/systemd-run --unit=cancel-multipath-wait-$kernel --description 'cancel waiting for multipath siblings of $kernel' --no-block --timer-property DefaultDependencies=no --timer-property Conflicts=shutdown.target --timer-property Before=shutdown.target --timer-property AccuracySec=500ms --property DefaultDependencies=no --property Conflicts=shutdown.target --property Before=shutdown.target --property Wants=multipathd.service --property After=multipathd.service --on-active=$env{FIND_MULTIPATHS_WAIT_UNTIL} /usr/bin/udevadm trigger --action=add $sys$devpath"
8b67ad
+RUN+="/usr/bin/systemd-run --unit=cancel-multipath-wait-$kernel --description 'cancel waiting for multipath siblings of $kernel' --no-block --timer-property DefaultDependencies=no --timer-property Conflicts=shutdown.target --timer-property Before=shutdown.target --timer-property Conflicts=initrd-cleanup.service --timer-property Before=initrd-cleanup.service --timer-property AccuracySec=500ms --property DefaultDependencies=no --property Conflicts=shutdown.target --property Before=shutdown.target --property Conflicts=initrd-cleanup.service --property Before=initrd-cleanup.service --on-active=$env{FIND_MULTIPATHS_WAIT_UNTIL} /usr/bin/udevadm trigger --action=add $sys$devpath"
8b67ad
 
8b67ad
 LABEL="pretend_mpath"
8b67ad
 ENV{DM_MULTIPATH_DEVICE_PATH}="1"