From 7b01946b2490dc4700fc2c2cf2ab4c1e49baf102 Mon Sep 17 00:00:00 2001 From: Benjamin Marzinski Date: Tue, 20 Jun 2017 16:28:50 -0500 Subject: [PATCH] device-mapper-multipath-0.4.9-88 Add 0213-RH-allow-overrides-section.patch * allow "overrides" section in multpath.conf, although it is completely ignored. Add 0214-RH-add-feature-fix.patch * fix setting no_path_rety on devices with no features defined in their configuration. --- 0213-RH-allow-overrides-section.patch | 64 +++++++++++++++++++++++++++ 0214-RH-add-feature-fix.patch | 25 +++++++++++ device-mapper-multipath.spec | 14 +++++- 3 files changed, 102 insertions(+), 1 deletion(-) create mode 100644 0213-RH-allow-overrides-section.patch create mode 100644 0214-RH-add-feature-fix.patch diff --git a/0213-RH-allow-overrides-section.patch b/0213-RH-allow-overrides-section.patch new file mode 100644 index 0000000..d0e5448 --- /dev/null +++ b/0213-RH-allow-overrides-section.patch @@ -0,0 +1,64 @@ +--- + libmultipath/dict.c | 42 ++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 42 insertions(+) + +Index: multipath-tools-130222/libmultipath/dict.c +=================================================================== +--- multipath-tools-130222.orig/libmultipath/dict.c ++++ multipath-tools-130222/libmultipath/dict.c +@@ -3642,6 +3642,18 @@ snprint_bled_product (char * buff, int l + + #define __deprecated + ++static int ++nop_handler(vector strvec) ++{ ++ return 0; ++} ++ ++static int ++snprint_nop(char * buff, int len, void * data) ++{ ++ return 0; ++} ++ + void + init_keywords(void) + { +@@ -3771,6 +3783,36 @@ init_keywords(void) + install_keyword("max_sectors_kb", &hw_max_sectors_kb_handler, &snprint_hw_max_sectors_kb); + install_sublevel_end(); + ++ install_keyword_root("overrides", &nop_handler); ++ install_keyword("path_grouping_policy", &nop_handler, &snprint_nop); ++ install_keyword("uid_attribute", &nop_handler, &snprint_nop); ++ install_keyword("path_selector", &nop_handler, &snprint_nop); ++ install_keyword("path_checker", &nop_handler, &snprint_nop); ++ install_keyword("checker", &nop_handler, &snprint_nop); ++ install_keyword("alias_prefix", &nop_handler, &snprint_nop); ++ install_keyword("features", &nop_handler, &snprint_nop); ++ install_keyword("hardware_handler", &nop_handler, &snprint_nop); ++ install_keyword("prio", &nop_handler, &snprint_nop); ++ install_keyword("prio_args", &nop_handler, &snprint_nop); ++ install_keyword("failback", &nop_handler, &snprint_nop); ++ install_keyword("rr_weight", &nop_handler, &snprint_nop); ++ install_keyword("no_path_retry", &nop_handler, &snprint_nop); ++ install_keyword("rr_min_io", &nop_handler, &snprint_nop); ++ install_keyword("rr_min_io_rq", &nop_handler, &snprint_nop); ++ install_keyword("pg_timeout", &nop_handler, &snprint_nop); ++ install_keyword("flush_on_last_del", &nop_handler, &snprint_nop); ++ install_keyword("fast_io_fail_tmo", &nop_handler, &snprint_nop); ++ install_keyword("dev_loss_tmo", &nop_handler, &snprint_nop); ++ install_keyword("user_friendly_names", &nop_handler, &snprint_nop); ++ install_keyword("retain_attached_hw_handler", &nop_handler, &snprint_nop); ++ install_keyword("detect_prio", &nop_handler, &snprint_nop); ++ install_keyword("detect_path_checker", &nop_handler, &snprint_nop); ++ install_keyword("deferred_remove", &nop_handler, &snprint_nop); ++ install_keyword("delay_watch_checks", &nop_handler, &snprint_nop); ++ install_keyword("delay_wait_checks", &nop_handler, &snprint_nop); ++ install_keyword("skip_kpartx", &nop_handler, &snprint_nop); ++ install_keyword("max_sectors_kb", &nop_handler, &snprint_nop); ++ + install_keyword_root("multipaths", &multipaths_handler); + install_keyword_multi("multipath", &multipath_handler, NULL); + install_sublevel(); diff --git a/0214-RH-add-feature-fix.patch b/0214-RH-add-feature-fix.patch new file mode 100644 index 0000000..e40abc8 --- /dev/null +++ b/0214-RH-add-feature-fix.patch @@ -0,0 +1,25 @@ +--- + libmultipath/structs.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +Index: multipath-tools-130222/libmultipath/structs.c +=================================================================== +--- multipath-tools-130222.orig/libmultipath/structs.c ++++ multipath-tools-130222/libmultipath/structs.c +@@ -511,6 +511,16 @@ add_feature (char **f, char *n) + if (!n || *n == '0') + return 0; + ++ /* default feature is null */ ++ if (!*f) ++ { ++ l = asprintf(&t, "1 %s", n); ++ if (l == -1) ++ return 1; ++ *f = t; ++ return 0; ++ } ++ + /* Check if feature is already present */ + if (strstr(*f, n)) + return 0; diff --git a/device-mapper-multipath.spec b/device-mapper-multipath.spec index e0a26a2..efd0281 100644 --- a/device-mapper-multipath.spec +++ b/device-mapper-multipath.spec @@ -1,7 +1,7 @@ Summary: Tools to manage multipath devices using device-mapper Name: device-mapper-multipath Version: 0.4.9 -Release: 87%{?dist} +Release: 88%{?dist} License: GPL+ Group: System Environment/Base URL: http://christophe.varoqui.free.fr/ @@ -219,6 +219,8 @@ Patch0209: 0209-UPBZ-1430097-multipath-C-API.patch Patch0210: 0210-RH-fix-uninstall.patch Patch0211: 0211-RH-strlen-fix.patch Patch0212: 0212-RHBZ-1431562-for-read-only.patch +Patch0213: 0213-RH-allow-overrides-section.patch +Patch0214: 0214-RH-add-feature-fix.patch # runtime Requires: %{name}-libs = %{version}-%{release} @@ -519,6 +521,8 @@ device-mapper-multipath's libdmmp C API library %patch0210 -p1 %patch0211 -p1 %patch0212 -p1 +%patch0213 -p1 +%patch0214 -p1 cp %{SOURCE1} . %build @@ -650,6 +654,14 @@ fi %{_pkgconfdir}/libdmmp.pc %changelog +* Tue Jun 20 2017 Benjamin Marzinski 0.4.9-88 +- Add 0213-RH-allow-overrides-section.patch + * allow "overrides" section in multpath.conf, although it is completely + ignored. +- Add 0214-RH-add-feature-fix.patch + * fix setting no_path_rety on devices with no features defined in + their configuration. + * Wed Apr 12 2017 Benjamin Marzinski 0.4.9-87 - Remove Epoch from device-mapper requires * The RHEL releases of device-mapper set the Epoch, and this was