Package: multipath-tools
Version: 0.5.0+git1.656f8865-5
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu yakkety ubuntu-patch

Dear Maintainer,

During "service multipath-tools start" /sbin/multipath is
called on dm- devices that are filtered but due to a condition
conf->dev_type == DEV_DEVNODE in filtering code multipath
binary wasn't dropping out when hitting a dm- device. This
was due to the fact that in this case conf->dev_type is
set to DEV_UEVENT.

This is causing the logs to be filled with following
messages:

multipath: dm-6: failed to get udev uid: Invalid argument
multipath: dm-6: failed to get sysfs uid: Invalid argument
multipath: dm-6: failed to get sgio uid: No such file or directory


In Ubuntu, the attached patch was applied to achieve the following:

This change alows the filtering to happen.


  * multipath-tools: fix dm- device filtering
   - Allow filtering of DEV_UEVENT dev_type
   - Resolves LP: #1570093


Thanks for considering the patch.


-- System Information:
Debian Release: stretch/sid
  APT prefers xenial-updates
  APT policy: (500, 'xenial-updates'), (500, 'xenial-security'), (500, 
'xenial'), (100, 'xenial-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.4.0-28-generic (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
diff -Nru multipath-tools-0.5.0+git1.656f8865/debian/control multipath-tools-0.5.0+git1.656f8865/debian/control
--- multipath-tools-0.5.0+git1.656f8865/debian/control	2016-03-23 10:36:54.000000000 -0500
+++ multipath-tools-0.5.0+git1.656f8865/debian/control	2016-07-12 11:20:25.000000000 -0500
@@ -1,8 +1,7 @@
 Source: multipath-tools
 Section: admin
 Priority: extra
-Maintainer: Ubuntu Developers <ubuntu-devel-disc...@lists.ubuntu.com>
-XSBC-Original-Maintainer: Debian LVM Team <pkg-lvm-maintain...@lists.alioth.debian.org>
+Maintainer: Debian LVM Team <pkg-lvm-maintain...@lists.alioth.debian.org>
 Uploaders: Guido Günther <a...@sigxcpu.org>, Ritesh Raj Sarraf <r...@debian.org>
 Build-Depends: debhelper (>= 7.0.17ubuntu2), po-debconf, libdevmapper-dev (>= 2:1.02.20), libreadline-dev, libaio-dev, libsystemd-dev, systemd, dh-systemd
 Vcs-Git: git://anonscm.debian.org/pkg-lvm/multipath-tools.git
diff -Nru multipath-tools-0.5.0+git1.656f8865/debian/patches/0001-multipath-tools-fix-dm-device-filtering.patch multipath-tools-0.5.0+git1.656f8865/debian/patches/0001-multipath-tools-fix-dm-device-filtering.patch
--- multipath-tools-0.5.0+git1.656f8865/debian/patches/0001-multipath-tools-fix-dm-device-filtering.patch	1969-12-31 18:00:00.000000000 -0600
+++ multipath-tools-0.5.0+git1.656f8865/debian/patches/0001-multipath-tools-fix-dm-device-filtering.patch	2016-07-08 10:13:45.000000000 -0500
@@ -0,0 +1,43 @@
+From 7dcf982221f1aa63226babaee2c41d8b0652b6d8 Mon Sep 17 00:00:00 2001
+From: Dragan Stancevic <dragan.stance...@canonical.com>
+Date: Thu, 23 Jun 2016 15:29:37 -0500
+Subject: [PATCH 1/1] multipath-tools: fix dm- device filtering
+
+During "service multipath-tools start" /sbin/multipath is
+called on dm- devices that are filtered but due to a condition
+conf->dev_type == DEV_DEVNODE in filtering code multipath
+binary wasn't dropping out when hitting a dm- device. This
+was due to the fact that in this case conf->dev_type is
+set to DEV_UEVENT.
+
+This is causing the logs to be filled with following
+messages:
+
+multipath: dm-6: failed to get udev uid: Invalid argument
+multipath: dm-6: failed to get sysfs uid: Invalid argument
+multipath: dm-6: failed to get sgio uid: No such file or directory
+
+This change alows the filtering to happen.
+
+Cc: Christophe Varoqui <christophe.varo...@opensvc.com>
+Cc: device-mapper development <dm-de...@redhat.com>
+
+Signed-off-by: Dragan Stancevic <dragan.stance...@canonical.com>
+---
+ multipath/main.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+Index: multipath-tools-0.5.0+git1.656f8865/multipath/main.c
+===================================================================
+--- multipath-tools-0.5.0+git1.656f8865.orig/multipath/main.c
++++ multipath-tools-0.5.0+git1.656f8865/multipath/main.c
+@@ -267,7 +267,8 @@ configure (void)
+ 	/*
+ 	 * if we have a blacklisted device parameter, exit early
+ 	 */
+-	if (dev && conf->dev_type == DEV_DEVNODE &&
++	if (dev && (conf->dev_type == DEV_DEVNODE ||
++		    conf->dev_type == DEV_UEVENT) &&
+ 	    conf->cmd != CMD_REMOVE_WWID &&
+ 	    (filter_devnode(conf->blist_devnode,
+ 			    conf->elist_devnode, dev) > 0)) {
diff -Nru multipath-tools-0.5.0+git1.656f8865/debian/patches/series multipath-tools-0.5.0+git1.656f8865/debian/patches/series
--- multipath-tools-0.5.0+git1.656f8865/debian/patches/series	2016-04-04 21:36:42.000000000 -0500
+++ multipath-tools-0.5.0+git1.656f8865/debian/patches/series	2016-07-08 10:10:19.000000000 -0500
@@ -16,3 +16,4 @@
 git-kpartx-support-spaces-in-dev-names-b407050a.patch
 kpartx_more_loopback_fixes.patch
 enable-find-multipaths.patch
+0001-multipath-tools-fix-dm-device-filtering.patch

Reply via email to