Change patch format to remove Git version * Patches 0001-0122 only have the patch format modified Update to the head of the upstream staging branch plus redhat patches * Patches 0123-0134 & 1036-0142 are from the upstream staging branch * Patches 0143-1046 have been submitted upstream * Patch 0156 is a Red Hat only patch. Red Hat udev rules set ID_SERIAL from 60-persistent-storage.rules instead of 55-scsi-sg3_id.rules. Multipath's parse_vpd_pg83() function needs to match the ID_SERIAL value from udev. Rename files * Previous patches 0123-0132 are now patches 1035 & 0147-0155
40 lines
1.5 KiB
Diff
40 lines
1.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Martin Wilck <mwilck@suse.com>
|
|
Date: Tue, 15 Sep 2020 10:57:22 +0200
|
|
Subject: [PATCH] multipathd: send "RELOADING=1" to systemd on DAEMON_CONFIGURE
|
|
state
|
|
|
|
The logic is as follows: child() sets DAEMON_IDLE status after
|
|
DAEMON_CONFIGURE when reconfigure() has finished. The only other state change
|
|
that can race with that is DAEMON_SHUTDOWN. Other state changes will wait for
|
|
DAEMON_IDLE first (see set_config_state()). When DAEMON_CONFIGURE is entered,
|
|
and we are not just starting up, send a "RELOADING=1" message to
|
|
systemd. After that, we must send "READY=1" when we're done reloading. Also
|
|
do that on startup, when DAEMON_IDLE is set for the first time.
|
|
See sd_notify(3).
|
|
|
|
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
---
|
|
multipathd/main.c | 5 +++--
|
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/multipathd/main.c b/multipathd/main.c
|
|
index c264351c..e3f2328d 100644
|
|
--- a/multipathd/main.c
|
|
+++ b/multipathd/main.c
|
|
@@ -210,10 +210,11 @@ static void do_sd_notify(enum daemon_status old_state,
|
|
|
|
if (new_state == DAEMON_SHUTDOWN)
|
|
sd_notify(0, "STOPPING=1");
|
|
- else if (new_state == DAEMON_IDLE && !startup_done) {
|
|
+ else if (new_state == DAEMON_IDLE && old_state == DAEMON_CONFIGURE) {
|
|
sd_notify(0, "READY=1");
|
|
startup_done = true;
|
|
- }
|
|
+ } else if (new_state == DAEMON_CONFIGURE && startup_done)
|
|
+ sd_notify(0, "RELOADING=1");
|
|
}
|
|
#endif
|
|
|