device-mapper-multipath-0.8.7-6

Add 0041-multipathd-handle-fpin-events.patch
Add 0042-multipathd-disallow-changing-to-from-fpin-marginal-p.patch
  * Add "marginal_pathgroups fpin" for responding to PFIN-Li events
  * Fixes bz #2053642
Modify tests/restate_module
  * Always offline the path with the lowest priority
  * Fixes bz #2052633
Resolves: bz #2052633, #2053642
This commit is contained in:
Benjamin Marzinski 2022-02-09 13:51:34 -06:00
parent cb0bddd714
commit 95d0c03f24
4 changed files with 1147 additions and 2 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,73 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Benjamin Marzinski <bmarzins@redhat.com>
Date: Fri, 11 Feb 2022 17:23:39 -0600
Subject: [PATCH] multipathd: disallow changing to/from fpin marginal paths on
reconfig
Setting marginal_pathgroups to fpin causes two new threads to be created
when multipathd starts. Turning it on after multipathd starts up won't
cause the theads to start, and turing it off won't keep the threads from
working. So disallow changing marginal_pathgroups to/from "fpin" on
reconfigure.
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
---
multipath/multipath.conf.5 | 13 ++++++++-----
multipathd/main.c | 9 +++++++++
2 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/multipath/multipath.conf.5 b/multipath/multipath.conf.5
index 5ed2cd3c..58ad5c9c 100644
--- a/multipath/multipath.conf.5
+++ b/multipath/multipath.conf.5
@@ -1102,15 +1102,18 @@ have been tried first. This prevents the possibility of IO errors occuring
while marginal paths are still usable. After the path has been monitored
for the configured time, and is declared healthy, it will be returned to its
normal pathgroup.
-However if this option is set to \fIfpin\fR multipathd will receive fpin
+If this option is set to \fIfpin\fR, multipathd will receive fpin
notifications, set path states to "marginal" accordingly, and regroup paths
-as described for "marginal_pathgroups yes". This option can't be used in combination
-with other options for "Shaky path detection" (see below).If it is set to fpin,
-marginal_path_xyz and san_path_err_xyz parameters are implicitly set to 0.
+as described for \fIon\fR. This option can't be used in combination
+with other options for "Shaky path detection" (see below). \fBNote:\fR If this
+is set to \fIfpin\fR, the \fImarginal_path_*\fR and \fIsan_path_err_*\fR
+options are implicitly set to \fIno\fP. Also, this option cannot be switched
+either to or from \fIfpin\fR on a multipathd reconfigure. multipathd must be
+restarted for the change to take effect.
See "Shaky paths detection" below for more information.
.RS
.TP
-The default is: \fBno\fR
+The default is: \fBoff\fR
.RE
.
.
diff --git a/multipathd/main.c b/multipathd/main.c
index 53be9b95..45b9572f 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -2792,6 +2792,7 @@ int
reconfigure (struct vectors * vecs)
{
struct config * old, *conf;
+ int old_marginal_pathgroups;
conf = load_config(DEFAULT_CONFIGFILE);
if (!conf)
@@ -2819,6 +2820,14 @@ reconfigure (struct vectors * vecs)
uxsock_timeout = conf->uxsock_timeout;
old = rcu_dereference(multipath_conf);
+ old_marginal_pathgroups = old->marginal_pathgroups;
+ if ((old_marginal_pathgroups == MARGINAL_PATHGROUP_FPIN) !=
+ (conf->marginal_pathgroups == MARGINAL_PATHGROUP_FPIN)) {
+ condlog(1, "multipathd must be restarted to turn %s fpin marginal paths",
+ (old_marginal_pathgroups == MARGINAL_PATHGROUP_FPIN)?
+ "off" : "on");
+ conf->marginal_pathgroups = old_marginal_pathgroups;
+ }
conf->sequence_nr = old->sequence_nr + 1;
rcu_assign_pointer(multipath_conf, conf);
call_rcu(&old->rcu, rcu_free_config);

View File

@ -1,6 +1,6 @@
Name: device-mapper-multipath
Version: 0.8.7
Release: 5%{?dist}
Release: 6%{?dist}
Summary: Tools to manage multipath devices using device-mapper
License: GPLv2
URL: http://christophe.varoqui.free.fr/
@ -50,6 +50,8 @@ Patch0037: 0037-libmultipath-make-helper-function-to-trigger-path-ue.patch
Patch0038: 0038-multipathd-trigger-udev-change-on-path-addition.patch
Patch0039: 0039-RH-add-support-to-mpathconf-for-setting-arbitrary-de.patch
Patch0040: 0040-RH-add-support-to-mpathconf-for-setting-recheck_wwid.patch
Patch0041: 0041-multipathd-handle-fpin-events.patch
Patch0042: 0042-multipathd-disallow-changing-to-from-fpin-marginal-p.patch
# runtime
@ -249,6 +251,16 @@ fi
%{_pkgconfdir}/libdmmp.pc
%changelog
* Wed Feb 9 2022 Benjamin Marzinski <bmarzins@redhat.com> - 0.8.7-6
- Add 0041-multipathd-handle-fpin-events.patch
- Add 0042-multipathd-disallow-changing-to-from-fpin-marginal-p.patch
* Add "marginal_pathgroups fpin" for responding to PFIN-Li events
* Fixes bz #2053642
- Modify tests/restate_module
* Always offline the path with the lowest priority
* Fixes bz #2052633
- Resolves: bz #2052633, #2053642
* Mon Feb 7 2022 Benjamin Marzinski <bmarzins@redhat.com> - 0.8.7-5
- Add 0039-RH-add-support-to-mpathconf-for-setting-arbitrary-de.patch
* Fixes bz #2050421

View File

@ -69,7 +69,7 @@ tlog "Checking if active path count equals 2"
assert "[[ $pathcount -eq 2 ]]"
tlog "offline one path device"
pathname=`multipathd show paths raw format "%d %m" | grep ${mpathdev} | head -1 | awk '{print $1}'`
pathname=`multipathd show paths raw format "%d %m %p" | grep ${mpathdev} | sort -k 3n | head -1 | awk '{print $1}'`
tlog "path to offline: ${pathname}"
trun "echo 'offline' > /sys/block/${pathname}/device/state"
tlog "waiting for multipathd to fail path"