diff options
author | Hongxu Jia <hongxu.jia@windriver.com> | 2017-07-05 05:13:17 -0400 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2017-07-14 23:44:30 +0200 |
commit | 1acfde8120eaa290df64f709e5a322bd6a44d19c (patch) | |
tree | 13d387707da99934f98ba276efe497f0d8c40388 /meta-oe/recipes-support/multipath-tools/files/0004-RH-don-t-start-without-a-config-file.patch | |
parent | 5688c8e24cf106f8248ea44e98ba15931844ed9b (diff) | |
download | meta-openembedded-contrib-1acfde8120eaa290df64f709e5a322bd6a44d19c.tar.gz |
multipath-tools: 0.6.4 -> 0.7.1
1. In fedora/redhat, it is renamed to device-mapper-multipath,
use PROVIDE and RPROVIDE to support.
2. Split ${PN}-libs
3. Add multipath.conf.example
4. Backport patches from fedora:
git://pkgs.fedoraproject.org/rpms/device-mapper-multipath
- 0001 ~ 0011
5. Rebase local patches:
- makefile_inc.patch -> 0012-multipath-tools-modify-Makefile.inc-for-cross-compil.patch
- always-use-libdevmapper.patch -> 0013-Always-use-devmapper.patch
- always-use-libdevmapper-kpartx.patch -> 0014-Always-use-devmapper-for-kpartx.patch
6. Drop obsolete patches:
- 0001-multipathd.service-Error-fix.patch
- shared-libs-avoid-linking-.so-as-executable.patch
- checkers-disable-libcheckrbd.so.patch
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/multipath-tools/files/0004-RH-don-t-start-without-a-config-file.patch')
-rw-r--r-- | meta-oe/recipes-support/multipath-tools/files/0004-RH-don-t-start-without-a-config-file.patch | 108 |
1 files changed, 108 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/multipath-tools/files/0004-RH-don-t-start-without-a-config-file.patch b/meta-oe/recipes-support/multipath-tools/files/0004-RH-don-t-start-without-a-config-file.patch new file mode 100644 index 0000000000..87a6d3fb65 --- /dev/null +++ b/meta-oe/recipes-support/multipath-tools/files/0004-RH-don-t-start-without-a-config-file.patch @@ -0,0 +1,108 @@ +From b2b504fc1959c7a3f0a843c3c204e8e193b675b7 Mon Sep 17 00:00:00 2001 +From: Benjamin Marzinski <bmarzins@redhat.com> +Date: Wed, 15 Oct 2014 10:39:30 -0500 +Subject: [PATCH 04/14] RH: don't start without a config file + +If /etc/multipath.conf doesn't exist, don't start multipathd and blacklist +all devices when running multipath. A completely blank configuration file +is almost never what users want. Also, people may have the multipath +packages installed but don't want to use them. This patch provides a +simple way to disable multipath. Simply removing or renaming +/etc/multipath.conf will keep multipath from doing anything. + +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 + + 5 files changed, 22 insertions(+) + +diff --git a/libmultipath/config.c b/libmultipath/config.c +index bb6619b..aae69b8 100644 +--- a/libmultipath/config.c ++++ b/libmultipath/config.c +@@ -25,6 +25,7 @@ + #include "prio.h" + #include "devmapper.h" + #include "mpath_cmd.h" ++#include "version.h" + + static int + hwe_strmatch (struct hwentry *hwe1, struct hwentry *hwe2) +@@ -667,6 +668,22 @@ load_config (char * file) + factorize_hwtable(conf->hwtable, builtin_hwtable_size); + } + ++ } else { ++ condlog(0, "/etc/multipath.conf does not exist, blacklisting all devices."); ++ condlog(0, "A default multipath.conf file is located at"); ++ condlog(0, "/usr/share/doc/device-mapper-multipath-%d.%d.%d/multipath.conf", MULTIPATH_VERSION(VERSION_CODE)); ++ if (conf->blist_devnode == NULL) { ++ conf->blist_devnode = vector_alloc(); ++ if (!conf->blist_devnode) { ++ condlog(0, "cannot allocate blacklist\n"); ++ goto out; ++ } ++ } ++ if (store_ble(conf->blist_devnode, strdup(".*"), ++ ORIGIN_NO_CONFIG)) { ++ condlog(0, "cannot store default no-config blacklist\n"); ++ goto out; ++ } + } + + conf->processed_main_config = 1; +diff --git a/libmultipath/config.h b/libmultipath/config.h +index ffc69b5..614331c 100644 +--- a/libmultipath/config.h ++++ b/libmultipath/config.h +@@ -7,6 +7,7 @@ + + #define ORIGIN_DEFAULT 0 + #define ORIGIN_CONFIG 1 ++#define ORIGIN_NO_CONFIG 2 + + /* + * In kernel, fast_io_fail == 0 means immediate failure on rport delete. +diff --git a/multipath/multipath.rules b/multipath/multipath.rules +index 4d78b98..5753766 100644 +--- a/multipath/multipath.rules ++++ b/multipath/multipath.rules +@@ -6,6 +6,7 @@ IMPORT{cmdline}="nompath" + ENV{nompath}=="?*", GOTO="end_mpath" + IMPORT{cmdline}="multipath" + ENV{multipath}=="off", GOTO="end_mpath" ++TEST!="/etc/multipath.conf", GOTO="end_mpath" + + 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 ++++ b/multipathd/multipathd.service +@@ -4,6 +4,7 @@ Wants=systemd-udev-trigger.service systemd-udev-settle.service + Before=iscsi.service iscsid.service lvm2-lvmetad.service lvm2-activation-early.service + Before=local-fs-pre.target blk-availability.service + After=multipathd.socket systemd-udev-trigger.service systemd-udev-settle.service ++ConditionPathExists=/etc/multipath.conf + DefaultDependencies=no + Conflicts=shutdown.target + ConditionKernelCommandLine=!nompath +-- +2.8.1 + |