device-mapper-multipath-0.7.1-2.gitf21166a
Modify 0004-RH-Remove-the-property-blacklist-exception-builtin.patch * update multipath.conf.5 man page to remove builtin listing Modify 0005-RH-don-t-start-without-a-config-file.patch * update multipathd.8 man page to note that a config file is necessary Modify 0007-RH-add-mpathconf.patch * add property blacklist-exception to default config file Add 0010-libmultipath-change-how-RADOS-checker-is-enabled.patch * Makefile now autodetects librados. Posted upstream Remove related RADOS option from spec file Add 0011-multipath-set-verbosity-to-default-during-config.patch * Allow multipath to print warning messages during configuration. Posted upstream Add 0012-mpath-skip-device-configs-without-vendor-product.patch * device entries without vendor/product were breaking configurations. Posted upsteam Add 0013-multipathd-fix-show-maps-json-crash.patch * multipathd crashed showing json output with no devices. Posted upstream
This commit is contained in:
parent
a4bb435b33
commit
c9012ec5b7
@ -13,8 +13,9 @@ it.
|
||||
|
||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
---
|
||||
libmultipath/blacklist.c | 15 ++++++---------
|
||||
1 file changed, 6 insertions(+), 9 deletions(-)
|
||||
libmultipath/blacklist.c | 15 ++++++---------
|
||||
multipath/multipath.conf.5 | 4 ----
|
||||
2 files changed, 6 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/libmultipath/blacklist.c b/libmultipath/blacklist.c
|
||||
index ee396e2..19d4697 100644
|
||||
@ -49,6 +50,21 @@ index ee396e2..19d4697 100644
|
||||
}
|
||||
|
||||
void
|
||||
diff --git a/multipath/multipath.conf.5 b/multipath/multipath.conf.5
|
||||
index f04ff19..fbbbb27 100644
|
||||
--- a/multipath/multipath.conf.5
|
||||
+++ b/multipath/multipath.conf.5
|
||||
@@ -1014,10 +1014,6 @@ The \fIWorld Wide Identification\fR of a device.
|
||||
.TP
|
||||
.B property
|
||||
Regular expression of the udev property to be whitelisted.
|
||||
-.RS
|
||||
-.TP
|
||||
-The default is: \fB(SCSI_IDENT_|ID_WWN)\fR
|
||||
-.RE
|
||||
.TP
|
||||
.B device
|
||||
Subsection for the device description. This subsection recognizes the
|
||||
--
|
||||
2.7.4
|
||||
|
||||
|
@ -15,8 +15,9 @@ Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
libmultipath/config.c | 17 +++++++++++++++++
|
||||
libmultipath/config.h | 1 +
|
||||
multipath/multipath.rules | 1 +
|
||||
multipathd/multipathd.8 | 2 ++
|
||||
multipathd/multipathd.service | 1 +
|
||||
4 files changed, 20 insertions(+)
|
||||
5 files changed, 22 insertions(+)
|
||||
|
||||
diff --git a/libmultipath/config.c b/libmultipath/config.c
|
||||
index bb6619b..aae69b8 100644
|
||||
@ -77,6 +78,19 @@ index 4d78b98..5753766 100644
|
||||
|
||||
KERNEL=="dm-*", GOTO="check_kpartx"
|
||||
ENV{DEVTYPE}!="partition", GOTO="test_dev"
|
||||
diff --git a/multipathd/multipathd.8 b/multipathd/multipathd.8
|
||||
index 4c765af..c1499a5 100644
|
||||
--- a/multipathd/multipathd.8
|
||||
+++ b/multipathd/multipathd.8
|
||||
@@ -39,6 +39,8 @@ map regains its maximum performance and redundancy.
|
||||
This daemon executes the external \fBmultipath\fR tool when events occur.
|
||||
In turn, the multipath tool signals the multipathd daemon when it is done with
|
||||
devmap reconfiguration, so that it can refresh its failed path list.
|
||||
+
|
||||
+In this Linux distribution, multipathd does not run unless a /etc/multipath.conffile exists
|
||||
.
|
||||
.
|
||||
.\" ----------------------------------------------------------------------------
|
||||
diff --git a/multipathd/multipathd.service b/multipathd/multipathd.service
|
||||
index fd66cf6..fafd088 100644
|
||||
--- a/multipathd/multipathd.service
|
||||
|
@ -14,9 +14,9 @@ Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
---
|
||||
libmultipath/config.c | 1 +
|
||||
multipath/Makefile | 5 +
|
||||
multipath/mpathconf | 460 ++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
multipath/mpathconf | 464 ++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
multipath/mpathconf.8 | 101 +++++++++++
|
||||
4 files changed, 567 insertions(+)
|
||||
4 files changed, 571 insertions(+)
|
||||
create mode 100644 multipath/mpathconf
|
||||
create mode 100644 multipath/mpathconf.8
|
||||
|
||||
@ -68,10 +68,10 @@ index 1e9ee4b..3d4d459 100644
|
||||
$(RM) core *.o $(EXEC) *.gz
|
||||
diff --git a/multipath/mpathconf b/multipath/mpathconf
|
||||
new file mode 100644
|
||||
index 0000000..c232ae9
|
||||
index 0000000..e839134
|
||||
--- /dev/null
|
||||
+++ b/multipath/mpathconf
|
||||
@@ -0,0 +1,460 @@
|
||||
@@ -0,0 +1,464 @@
|
||||
+#!/bin/bash
|
||||
+#
|
||||
+# Copyright (C) 2010 Red Hat, Inc. All rights reserved.
|
||||
@ -106,6 +106,10 @@ index 0000000..c232ae9
|
||||
+defaults {
|
||||
+ user_friendly_names yes
|
||||
+ find_multipaths yes
|
||||
+}
|
||||
+
|
||||
+blacklist_exceptions {
|
||||
+ property \"(SCSI_IDENT_|ID_WWN)\"
|
||||
+}"
|
||||
+
|
||||
+CONFIGFILE="/etc/multipath.conf"
|
||||
|
56
0010-libmultipath-change-how-RADOS-checker-is-enabled.patch
Normal file
56
0010-libmultipath-change-how-RADOS-checker-is-enabled.patch
Normal file
@ -0,0 +1,56 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
Date: Fri, 26 May 2017 17:52:57 -0500
|
||||
Subject: [PATCH] libmultipath: change how RADOS checker is enabled
|
||||
|
||||
Instead of making the user call "make", "make install" and "make clean"
|
||||
with ENABLE_RADOS set correctly, have the makefile check if
|
||||
/usr/include/rados/librados.h exists, just like it checks if specific
|
||||
functions exist in a file.
|
||||
|
||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
---
|
||||
Makefile.inc | 13 +++++++++++++
|
||||
libmultipath/checkers/Makefile | 3 ++-
|
||||
2 files changed, 15 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile.inc b/Makefile.inc
|
||||
index ffcc8b6..ecac8eb 100644
|
||||
--- a/Makefile.inc
|
||||
+++ b/Makefile.inc
|
||||
@@ -115,5 +115,18 @@ check_func = \
|
||||
echo "$$found" \
|
||||
)
|
||||
|
||||
+# Checker whether a file with name $1 exists
|
||||
+check_file = $(shell \
|
||||
+ if [ -f "$1" ]; then \
|
||||
+ found=1; \
|
||||
+ status="yes"; \
|
||||
+ else \
|
||||
+ found=0; \
|
||||
+ status="no"; \
|
||||
+ fi; \
|
||||
+ echo 1>&2 "Checking if $1 exists ... $$status"; \
|
||||
+ echo "$$found" \
|
||||
+ )
|
||||
+
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
diff --git a/libmultipath/checkers/Makefile b/libmultipath/checkers/Makefile
|
||||
index 732ca9d..bce6b8b 100644
|
||||
--- a/libmultipath/checkers/Makefile
|
||||
+++ b/libmultipath/checkers/Makefile
|
||||
@@ -14,7 +14,8 @@ LIBS= \
|
||||
libcheckemc_clariion.so \
|
||||
libcheckhp_sw.so \
|
||||
libcheckrdac.so
|
||||
-ifneq ($(ENABLE_RADOS),0)
|
||||
+
|
||||
+ifneq ($(call check_file,/usr/include/rados/librados.h),0)
|
||||
LIBS += libcheckrbd.so
|
||||
endif
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
40
0011-multipath-set-verbosity-to-default-during-config.patch
Normal file
40
0011-multipath-set-verbosity-to-default-during-config.patch
Normal file
@ -0,0 +1,40 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
Date: Wed, 31 May 2017 15:03:02 -0500
|
||||
Subject: [PATCH] multipath: set verbosity to default during config
|
||||
|
||||
condlog was setting the verbosity to 0 if there was no configuration.
|
||||
This keeps multipath from printing warning messages about config file
|
||||
problems that are found while loading the configuration. Instead, it
|
||||
should use the default config level until it loads the configuration
|
||||
to find the current value.
|
||||
|
||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
---
|
||||
libmultipath/debug.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libmultipath/debug.c b/libmultipath/debug.c
|
||||
index fbe171a..f89b264 100644
|
||||
--- a/libmultipath/debug.c
|
||||
+++ b/libmultipath/debug.c
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "../third-party/valgrind/drd.h"
|
||||
#include "vector.h"
|
||||
#include "config.h"
|
||||
+#include "defaults.h"
|
||||
|
||||
void dlog (int sink, int prio, const char * fmt, ...)
|
||||
{
|
||||
@@ -21,7 +22,7 @@ void dlog (int sink, int prio, const char * fmt, ...)
|
||||
va_start(ap, fmt);
|
||||
conf = get_multipath_config();
|
||||
ANNOTATE_IGNORE_READS_BEGIN();
|
||||
- thres = (conf) ? conf->verbosity : 0;
|
||||
+ thres = (conf) ? conf->verbosity : DEFAULT_VERBOSITY;
|
||||
ANNOTATE_IGNORE_READS_END();
|
||||
put_multipath_config(conf);
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
37
0012-mpath-skip-device-configs-without-vendor-product.patch
Normal file
37
0012-mpath-skip-device-configs-without-vendor-product.patch
Normal file
@ -0,0 +1,37 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
Date: Wed, 31 May 2017 17:58:59 -0500
|
||||
Subject: [PATCH] mpath: skip device configs without vendor/product
|
||||
|
||||
Right now if multipath.conf includes a device configuration without a
|
||||
vendor or product string, it will automatically be applied to all
|
||||
devices, skipping all other configs entirely. This is clearly wrong.
|
||||
This patch makes sure that user added configs include vendor and
|
||||
product strings
|
||||
|
||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
---
|
||||
libmultipath/config.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/libmultipath/config.c b/libmultipath/config.c
|
||||
index c485748..bdde113 100644
|
||||
--- a/libmultipath/config.c
|
||||
+++ b/libmultipath/config.c
|
||||
@@ -452,6 +452,13 @@ restart:
|
||||
break;
|
||||
j = n;
|
||||
vector_foreach_slot_after(hw, hwe2, j) {
|
||||
+ /* drop invalid device configs */
|
||||
+ if (!hwe2->vendor || !hwe2->product) {
|
||||
+ condlog(0, "device config missing vendor or product parameter");
|
||||
+ vector_del_slot(hw, j--);
|
||||
+ free_hwe(hwe2);
|
||||
+ continue;
|
||||
+ }
|
||||
if (hwe_regmatch(hwe1, hwe2))
|
||||
continue;
|
||||
/* dup */
|
||||
--
|
||||
2.7.4
|
||||
|
38
0013-multipathd-fix-show-maps-json-crash.patch
Normal file
38
0013-multipathd-fix-show-maps-json-crash.patch
Normal file
@ -0,0 +1,38 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
Date: Thu, 1 Jun 2017 17:52:28 -0500
|
||||
Subject: [PATCH] multipathd: fix "show maps json" crash
|
||||
|
||||
If there are no multipath devices, show_maps_json sets the maximum size
|
||||
of the reply buffer to 0. Having a size of 0 causes the calls to calloc
|
||||
and realloc to behave in ways that the code isn't designed to handle,
|
||||
leading to a double-free crash. Instead, show_maps_json should just
|
||||
use the INITIAL_REPLY_LEN if there are no multipath devices.
|
||||
|
||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
---
|
||||
multipathd/cli_handlers.c | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/multipathd/cli_handlers.c b/multipathd/cli_handlers.c
|
||||
index 04c7386..7b0d00c 100644
|
||||
--- a/multipathd/cli_handlers.c
|
||||
+++ b/multipathd/cli_handlers.c
|
||||
@@ -162,10 +162,12 @@ show_maps_json (char ** r, int * len, struct vectors * vecs)
|
||||
struct multipath * mpp;
|
||||
char * c;
|
||||
char * reply;
|
||||
- unsigned int maxlen = INITIAL_REPLY_LEN *
|
||||
- PRINT_JSON_MULTIPLIER * VECTOR_SIZE(vecs->mpvec);
|
||||
+ unsigned int maxlen = INITIAL_REPLY_LEN;
|
||||
int again = 1;
|
||||
|
||||
+ if (VECTOR_SIZE(vecs->mpvec) > 0)
|
||||
+ maxlen *= PRINT_JSON_MULTIPLIER * VECTOR_SIZE(vecs->mpvec);
|
||||
+
|
||||
vector_foreach_slot(vecs->mpvec, mpp, i) {
|
||||
if (update_multipath(vecs, mpp->alias, 0)) {
|
||||
return 1;
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,7 +1,7 @@
|
||||
Summary: Tools to manage multipath devices using device-mapper
|
||||
Name: device-mapper-multipath
|
||||
Version: 0.7.1
|
||||
Release: 1.gitf21166a%{?dist}
|
||||
Release: 2.gitf21166a%{?dist}
|
||||
License: GPL+
|
||||
Group: System Environment/Base
|
||||
URL: http://christophe.varoqui.free.fr/
|
||||
@ -20,6 +20,10 @@ Patch0006: 0006-RH-use-rpm-optflags-if-present.patch
|
||||
Patch0007: 0007-RH-add-mpathconf.patch
|
||||
Patch0008: 0008-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch
|
||||
Patch0009: 0009-RH-trigger-change-uevent-on-new-device-creation.patch
|
||||
Patch0010: 0010-libmultipath-change-how-RADOS-checker-is-enabled.patch
|
||||
Patch0011: 0011-multipath-set-verbosity-to-default-during-config.patch
|
||||
Patch0012: 0012-mpath-skip-device-configs-without-vendor-product.patch
|
||||
Patch0013: 0013-multipathd-fix-show-maps-json-crash.patch
|
||||
|
||||
# runtime
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
@ -117,19 +121,18 @@ device-mapper-multipath's libdmmp C API library
|
||||
%patch0007 -p1
|
||||
%patch0008 -p1
|
||||
%patch0009 -p1
|
||||
%patch0010 -p1
|
||||
%patch0011 -p1
|
||||
%patch0012 -p1
|
||||
%patch0013 -p1
|
||||
cp %{SOURCE1} .
|
||||
|
||||
%build
|
||||
%ifarch x86_64
|
||||
%define _rados 1
|
||||
%else
|
||||
%define _rados 0
|
||||
%endif
|
||||
%define _sbindir /usr/sbin
|
||||
%define _libdir /usr/%{_lib}
|
||||
%define _libmpathdir %{_libdir}/multipath
|
||||
%define _pkgconfdir %{_libdir}/pkgconfig
|
||||
make %{?_smp_mflags} LIB=%{_lib} ENABLE_RADOS=%{_rados}
|
||||
make %{?_smp_mflags} LIB=%{_lib}
|
||||
|
||||
%install
|
||||
make install \
|
||||
@ -140,8 +143,7 @@ make install \
|
||||
rcdir=%{_initrddir} \
|
||||
unitdir=%{_unitdir} \
|
||||
includedir=%{_includedir} \
|
||||
pkgconfdir=%{_pkgconfdir} \
|
||||
ENABLE_RADOS=%{_rados}
|
||||
pkgconfdir=%{_pkgconfdir}
|
||||
|
||||
# tree fix up
|
||||
install -d %{buildroot}/etc/multipath
|
||||
@ -256,6 +258,26 @@ fi
|
||||
%{_pkgconfdir}/libdmmp.pc
|
||||
|
||||
%changelog
|
||||
* Fri Jun 2 2017 Benjamin Marzinski <bmarzins@redhat.com> 0.7.1-2.gitf21166a
|
||||
- Modify 0004-RH-Remove-the-property-blacklist-exception-builtin.patch
|
||||
* update multipath.conf.5 man page to remove builtin listing
|
||||
- Modify 0005-RH-don-t-start-without-a-config-file.patch
|
||||
* update multipathd.8 man page to note that a config file is necessary
|
||||
- Modify 0007-RH-add-mpathconf.patch
|
||||
* add property blacklist-exception to default config file
|
||||
- Add 0010-libmultipath-change-how-RADOS-checker-is-enabled.patch
|
||||
* Makefile now autodetects librados. Posted upstream
|
||||
- Remove related RADOS option from spec file
|
||||
- Add 0011-multipath-set-verbosity-to-default-during-config.patch
|
||||
* Allow multipath to print warning messages during configuration.
|
||||
Posted upstream
|
||||
- Add 0012-mpath-skip-device-configs-without-vendor-product.patch
|
||||
* device entries without vendor/product were breaking configurations.
|
||||
Posted upsteam
|
||||
- Add 0013-multipathd-fix-show-maps-json-crash.patch
|
||||
* multipathd crashed showing json output with no devices. Posted
|
||||
upstream
|
||||
|
||||
* Tue May 23 2017 Benjamin Marzinski <bmarzins@redhat.com> 0.7.1-1.gitf21166a
|
||||
- Update Source to the latest upstream commit
|
||||
- Add 0001-libmultipath-add-comment-about-resuming.patch
|
||||
|
Loading…
Reference in New Issue
Block a user