|
|
5c2e41 |
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
5c2e41 |
From: Benjamin Marzinski <bmarzins@redhat.com>
|
|
|
5c2e41 |
Date: Mon, 25 Feb 2019 21:55:37 -0600
|
|
|
5c2e41 |
Subject: [PATCH] BZ 1673167: fixup wwid recheck
|
|
|
5c2e41 |
|
|
|
5c2e41 |
When multipathd was ignoring the failed get_uid output, there was still
|
|
|
5c2e41 |
a way for the wwid to get set to 0. Fix that.
|
|
|
5c2e41 |
|
|
|
5c2e41 |
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
|
5c2e41 |
---
|
|
|
5c2e41 |
multipathd/main.c | 9 ++++++---
|
|
|
5c2e41 |
1 file changed, 6 insertions(+), 3 deletions(-)
|
|
|
5c2e41 |
|
|
|
5c2e41 |
diff --git a/multipathd/main.c b/multipathd/main.c
|
|
|
5c2e41 |
index 30eb8fe..1dc53b2 100644
|
|
|
5c2e41 |
--- a/multipathd/main.c
|
|
|
5c2e41 |
+++ b/multipathd/main.c
|
|
|
5c2e41 |
@@ -1211,9 +1211,10 @@ uev_update_path (struct uevent *uev, struct vectors * vecs)
|
|
|
5c2e41 |
goto out;
|
|
|
5c2e41 |
|
|
|
5c2e41 |
strcpy(wwid, pp->wwid);
|
|
|
5c2e41 |
- rc = get_uid(pp, pp->state, uev->udev);
|
|
|
5c2e41 |
+ get_uid(pp, pp->state, uev->udev);
|
|
|
5c2e41 |
|
|
|
5c2e41 |
- if (rc == 0 && strncmp(wwid, pp->wwid, WWID_SIZE) != 0) {
|
|
|
5c2e41 |
+ if (strlen(pp->wwid) &&
|
|
|
5c2e41 |
+ 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,8 +1230,10 @@ uev_update_path (struct uevent *uev, struct vectors * vecs)
|
|
|
5c2e41 |
goto out;
|
|
|
5c2e41 |
}
|
|
|
5c2e41 |
} else {
|
|
|
5c2e41 |
- if (rc == 0)
|
|
|
5c2e41 |
+ if (strlen(pp->wwid))
|
|
|
5c2e41 |
pp->wwid_changed = 0;
|
|
|
5c2e41 |
+ else
|
|
|
5c2e41 |
+ strcpy(pp->wwid, wwid);
|
|
|
5c2e41 |
udev_device_unref(pp->udev);
|
|
|
5c2e41 |
pp->udev = udev_device_ref(uev->udev);
|
|
|
5c2e41 |
conf = get_multipath_config();
|
|
|
5c2e41 |
--
|
|
|
5c2e41 |
2.17.2
|
|
|
5c2e41 |
|