From 38c063d806a45ea77cd2ccaaf8b0b13738071594 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 16 Nov 2021 04:19:39 +0000 Subject: [PATCH] import device-mapper-multipath-0.8.4-19.el8 --- ...t-add-missing-conditions-from-servic.patch | 43 ++++++++++++ ...-section-name-to-invalid-keyword-out.patch | 70 +++++++++++++++++++ SPECS/device-mapper-multipath.spec | 15 +++- 3 files changed, 127 insertions(+), 1 deletion(-) create mode 100644 SOURCES/0077-multipathd.socket-add-missing-conditions-from-servic.patch create mode 100644 SOURCES/0078-libmulitpath-add-section-name-to-invalid-keyword-out.patch diff --git a/SOURCES/0077-multipathd.socket-add-missing-conditions-from-servic.patch b/SOURCES/0077-multipathd.socket-add-missing-conditions-from-servic.patch new file mode 100644 index 0000000..3b1fb1c --- /dev/null +++ b/SOURCES/0077-multipathd.socket-add-missing-conditions-from-servic.patch @@ -0,0 +1,43 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Luca BRUNO +Date: Fri, 24 Sep 2021 09:34:01 +0000 +Subject: [PATCH] multipathd.socket: add missing conditions from service unit + +Upstream Status: https://github.com/openSUSE/multipath-tools.git +Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2008101 +Conflicts: Match the conditions with RHEL-8 multipathd.service unit + +commit 345ccf564ce7d904641bd32baf4fc53c2283d95c +Author: Luca BRUNO +Date: Fri Sep 24 09:34:01 2021 +0000 + + multipathd.socket: add missing conditions from service unit + + This aligns 'multipathd' socket and service units, by adding the + start conditions that are set on the service but not on the socket. + It should help avoiding situations where the socket unit ends up + marked as failed after hitting its retry-limit. + + Fixes: https://github.com/opensvc/multipath-tools/issues/15 + Signed-off-by: Luca BRUNO + Reviewed-by: Martin Wilck + +Signed-off-by: Benjamin Marzinski +--- + multipathd/multipathd.socket | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/multipathd/multipathd.socket b/multipathd/multipathd.socket +index 0ed4a1f7..c62c0fc8 100644 +--- a/multipathd/multipathd.socket ++++ b/multipathd/multipathd.socket +@@ -1,6 +1,9 @@ + [Unit] + Description=multipathd control socket + DefaultDependencies=no ++ConditionPathExists=/etc/multipath.conf ++ConditionKernelCommandLine=!nompath ++ConditionKernelCommandLine=!multipath=off + Before=sockets.target + + [Socket] diff --git a/SOURCES/0078-libmulitpath-add-section-name-to-invalid-keyword-out.patch b/SOURCES/0078-libmulitpath-add-section-name-to-invalid-keyword-out.patch new file mode 100644 index 0000000..8006ecd --- /dev/null +++ b/SOURCES/0078-libmulitpath-add-section-name-to-invalid-keyword-out.patch @@ -0,0 +1,70 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Benjamin Marzinski +Date: Thu, 23 Sep 2021 14:16:51 -0500 +Subject: [PATCH] libmulitpath: add section name to invalid keyword output + +If users forget the closing brace for a section in multipath.conf, +multipath has no way to detect that. When it sees the keyword at the +start of the next section, it will complain that there is an invalid +keyword, because that keyword doesn't belong in previous section (which +was never ended with a closing brace). This can confuse users. To make +this easier to understand, when multipath prints and invalid keyword +message, it now also prints the current section name, which can give +users a hint that they didn't end the previous section. + +Signed-off-by: Benjamin Marzinski +--- + libmultipath/parser.c | 21 ++++++++++++++------- + 1 file changed, 14 insertions(+), 7 deletions(-) + +diff --git a/libmultipath/parser.c b/libmultipath/parser.c +index 48b54e87..96b95936 100644 +--- a/libmultipath/parser.c ++++ b/libmultipath/parser.c +@@ -507,7 +507,8 @@ validate_config_strvec(vector strvec, char *file) + } + + static int +-process_stream(struct config *conf, FILE *stream, vector keywords, char *file) ++process_stream(struct config *conf, FILE *stream, vector keywords, ++ const char *section, char *file) + { + int i; + int r = 0, t; +@@ -571,16 +572,22 @@ process_stream(struct config *conf, FILE *stream, vector keywords, char *file) + if (keyword->sub) { + kw_level++; + r += process_stream(conf, stream, +- keyword->sub, file); ++ keyword->sub, ++ keyword->string, ++ file); + kw_level--; + } + break; + } + } +- if (i >= VECTOR_SIZE(keywords)) +- condlog(1, "%s line %d, invalid keyword: %s", +- file, line_nr, str); +- ++ if (i >= VECTOR_SIZE(keywords)) { ++ if (section) ++ condlog(1, "%s line %d, invalid keyword in the %s section: %s", ++ file, line_nr, section, str); ++ else ++ condlog(1, "%s line %d, invalid keyword: %s", ++ file, line_nr, str); ++ } + free_strvec(strvec); + } + if (kw_level == 1) +@@ -611,7 +618,7 @@ process_file(struct config *conf, char *file) + + /* Stream handling */ + line_nr = 0; +- r = process_stream(conf, stream, conf->keywords, file); ++ r = process_stream(conf, stream, conf->keywords, NULL, file); + fclose(stream); + //free_keywords(keywords); + diff --git a/SPECS/device-mapper-multipath.spec b/SPECS/device-mapper-multipath.spec index 88faf9d..cd38fb0 100644 --- a/SPECS/device-mapper-multipath.spec +++ b/SPECS/device-mapper-multipath.spec @@ -1,7 +1,7 @@ Summary: Tools to manage multipath devices using device-mapper Name: device-mapper-multipath Version: 0.8.4 -Release: 17%{?dist} +Release: 19%{?dist} License: GPLv2 Group: System Environment/Base URL: http://christophe.varoqui.free.fr/ @@ -87,6 +87,8 @@ Patch00073: 0073-multipath.conf-fix-typo-in-checker_timeout-descripti.patch Patch00074: 0074-mpathpersist-fail-commands-when-no-usable-paths-exis.patch Patch00075: 0075-multipath-print-warning-if-multipathd-is-not-running.patch Patch00076: 0076-multipathd-don-t-access-path-if-it-was-deleted.patch +Patch00077: 0077-multipathd.socket-add-missing-conditions-from-servic.patch +Patch00078: 0078-libmulitpath-add-section-name-to-invalid-keyword-out.patch # runtime Requires: %{name}-libs = %{version}-%{release} @@ -288,6 +290,17 @@ fi %{_pkgconfdir}/libdmmp.pc %changelog +* Thu Oct 28 2021 Benjamin Marzinski 0.8.4-19 +- Fix multipath_conf_syntax test to work with bz #1918150 +- Resolves: bz #1918150 + +* Thu Oct 7 2021 Benjamin Marzinski 0.8.4-18 +- Add 0077-multipathd.socket-add-missing-conditions-from-servic.patch + * Fixes bz #2008101 +- Add 0078-libmulitpath-add-section-name-to-invalid-keyword-out.patch + * Fixes bz #1918150 +- Resolves: bz #1918150, #2008101 + * Fri Jul 23 2021 Benjamin Marzinski 0.8.4-17 - Add 0074-mpathpersist-fail-commands-when-no-usable-paths-exis.patch * Fixes bz #1984723