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