Blame SOURCES/0022-BZ-1673167-ignore-failed-wwid-recheck.patch

5c2e41
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
5c2e41
From: Benjamin Marzinski <bmarzins@redhat.com>
5c2e41
Date: Wed, 20 Feb 2019 17:05:08 -0600
5c2e41
Subject: [PATCH] BZ 1673167: ignore failed wwid recheck
5c2e41
5c2e41
If disable_changed_wwids is set, when multipathd gets a change event on
5c2e41
a path, it verifies that the wwid hasn't changed in uev_update_path().
5c2e41
If get_uid() failed, uev_update_path treated this as a wwid change to 0.
5c2e41
This could cause paths to suddenly be dropped due to an issue with
5c2e41
getting the wwid.  Even if get_uid() failed because the path was down,
5c2e41
it no change uevent happend when it later became active, multipathd
5c2e41
would continue to ignore the path.
5c2e41
5c2e41
Instead, multipathd should neither set nor clear wwid_changed if
5c2e41
get_uid() returned failure.
5c2e41
5c2e41
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
5c2e41
---
5c2e41
 multipathd/main.c | 8 +++++---
5c2e41
 1 file changed, 5 insertions(+), 3 deletions(-)
5c2e41
5c2e41
diff --git a/multipathd/main.c b/multipathd/main.c
5c2e41
index 82a298b..30eb8fe 100644
5c2e41
--- a/multipathd/main.c
5c2e41
+++ b/multipathd/main.c
5c2e41
@@ -1211,9 +1211,9 @@ uev_update_path (struct uevent *uev, struct vectors * vecs)
5c2e41
 			goto out;
5c2e41
 
5c2e41
 		strcpy(wwid, pp->wwid);
5c2e41
-		get_uid(pp, pp->state, uev->udev);
5c2e41
+		rc = get_uid(pp, pp->state, uev->udev);
5c2e41
 
5c2e41
-		if (strncmp(wwid, pp->wwid, WWID_SIZE) != 0) {
5c2e41
+		if (rc == 0 && strncmp(wwid, pp->wwid, WWID_SIZE) != 0) {
5c2e41
 			condlog(0, "%s: path wwid changed from '%s' to '%s'. %s",
5c2e41
 				uev->kernel, wwid, pp->wwid,
5c2e41
 				(disable_changed_wwids ? "disallowing" :
5c2e41
@@ -1229,7 +1229,8 @@ uev_update_path (struct uevent *uev, struct vectors * vecs)
5c2e41
 				goto out;
5c2e41
 			}
5c2e41
 		} else {
5c2e41
-			pp->wwid_changed = 0;
5c2e41
+			if (rc == 0)
5c2e41
+				pp->wwid_changed = 0;
5c2e41
 			udev_device_unref(pp->udev);
5c2e41
 			pp->udev = udev_device_ref(uev->udev);
5c2e41
 			conf = get_multipath_config();
5c2e41
@@ -1782,6 +1783,7 @@ int update_prio(struct path *pp, int refresh_all)
5c2e41
 
5c2e41
 int update_path_groups(struct multipath *mpp, struct vectors *vecs, int refresh)
5c2e41
 {
5c2e41
+	condlog(2, "%s: updating path groups for priority change", mpp->alias);
5c2e41
 	if (reload_map(vecs, mpp, refresh, 1))
5c2e41
 		return 1;
5c2e41
 
5c2e41
-- 
5c2e41
2.17.2
5c2e41