9abdc502cf
Rebased on top of additional commits staged for upstream * Previous patches 0048-0060 are now patches 0053-0054 & 0059-0069 Add 0048-libmultipath-add-device-to-hwtable.c.patch Add 0049-master-libmultipath-fix-use-after-free-when-iscsi-lo.patch Add 0050-libmultipath-warn-if-freeing-path-that-holds-mpp-hwe.patch Add 0051-libmultipath-warn-about-NULL-value-of-mpp-hwe.patch Add 0052-libmultipath-fix-mpp-hwe-handling-in-sync_paths.patch Add 0055-libmultipath-remove-code-duplication-in-path-countin.patch Add 0056-libmultipath-count-pending-paths-as-active-on-loads.patch Add 0057-libmultipath-deal-with-flushing-no-maps.patch Add 0058-multipath-deal-with-delegation-failures-correctly.patch Add 0070-multipath-add-libmpathvalid-library.patch * adds the libmpathvalid.so library to determine if devices are valid multipath paths. Add 0071-libmultipath-add-uid-failback-for-dasd-devices.patch Add 0072-libmultipath-add-ignore_udev_uid-option.patch
40 lines
1.2 KiB
Diff
40 lines
1.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Benjamin Marzinski <bmarzins@redhat.com>
|
|
Date: Tue, 21 Jul 2020 01:37:18 -0500
|
|
Subject: [PATCH] multipath: deal with delegation failures correctly
|
|
|
|
delegate_to_multipathd() was returning success, even if the multipathd
|
|
command failed. Also, if the command was set to fail with NOT_DELEGATED,
|
|
it shouldn't print any errors, since multipath will try to issue to
|
|
command itself.
|
|
|
|
Fixes: "multipath: delegate flushing maps to multipathd"
|
|
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
---
|
|
multipath/main.c | 9 ++++++---
|
|
1 file changed, 6 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/multipath/main.c b/multipath/main.c
|
|
index 4c43314e..3da692dc 100644
|
|
--- a/multipath/main.c
|
|
+++ b/multipath/main.c
|
|
@@ -861,9 +861,12 @@ int delegate_to_multipathd(enum mpath_cmds cmd,
|
|
goto out;
|
|
}
|
|
|
|
- if (reply != NULL && *reply != '\0' && strcmp(reply, "ok\n"))
|
|
- printf("%s", reply);
|
|
- r = DELEGATE_OK;
|
|
+ if (reply != NULL && *reply != '\0') {
|
|
+ if (strcmp(reply, "fail\n"))
|
|
+ r = DELEGATE_OK;
|
|
+ if (r != NOT_DELEGATED && strcmp(reply, "ok\n"))
|
|
+ printf("%s", reply);
|
|
+ }
|
|
|
|
out:
|
|
FREE(reply);
|
|
--
|
|
2.17.2
|
|
|