From patchwork Thu Jun 23 21:06:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dragan Stancevic X-Patchwork-Id: 9196891 X-Patchwork-Delegate: christophe.varoqui@free.fr Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 168DC6075F for ; Fri, 24 Jun 2016 08:02:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 047E828488 for ; Fri, 24 Jun 2016 08:02:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ED21528490; Fri, 24 Jun 2016 08:02:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, HTML_MESSAGE, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from mx5-phx2.redhat.com (mx5-phx2.redhat.com [209.132.183.37]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B5DE528488 for ; Fri, 24 Jun 2016 08:02:06 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx5-phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u5O7wfBd044441; Fri, 24 Jun 2016 03:58:41 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u5NL6QVE019930 for ; Thu, 23 Jun 2016 17:06:26 -0400 Received: from mx1.redhat.com (ext-mx06.extmail.prod.ext.phx2.redhat.com [10.5.110.30]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u5NL6Q3T027087 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Thu, 23 Jun 2016 17:06:26 -0400 Received: from mail-it0-f49.google.com (mail-it0-f49.google.com [209.85.214.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CFA6D3B728 for ; Thu, 23 Jun 2016 21:06:25 +0000 (UTC) Received: by mail-it0-f49.google.com with SMTP id g127so118589ith.0 for ; Thu, 23 Jun 2016 14:06:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical-com.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to:cc; bh=ZTu6A8oO4KOeZkriybaz8/OGIePBPRirtRqQ8xQ+z4o=; b=W2mZpckGA6+oF5C1TFdORbS0y3GfH7LxA8EEG7UQdhMLhl7HS59myDSK+KMsWaaLmC bbo0XlnSpUblVDXMlHgTHhc6xiz+b6r53HsP9XObW4Xe+VNmwsdIRj/Y6HQx+3tfadKg f6ARiXmpuDI4HMaWwAihzyC+Pjv/8UmRf5Xy6Gd8Fv0JJDcKpJuTw3Gk32ck/R3Efujj y2vy+ueCByoqlVzk8ESv3nWSIeTYHCisBe6djLEK3+bX+xoQ6Bl/4SNqaWnueoCU0QdQ WTo+H4tHjaMbSl6MpoohSm9pKAkLfZmuFnGc938/DhYUeHBBeuYU82ubZk1hzwT8TRFa 53dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=ZTu6A8oO4KOeZkriybaz8/OGIePBPRirtRqQ8xQ+z4o=; b=fSDFbcjgtQGMeJvxAThqZAMxb4o5Ni2QajN68xmD1bjHSMGDgGSVR6rG0PdjPY15yF tlccuFZaQh8jOLPD3RRPgATi+wvlrvKVhzxhRl3Vs8SMXpA4LlH9nYccOyXnmldzJhaO nAr9itWBbmGi2UslFnebvc+On6lPCRYBM5/FPWzMep1CgGR0EAzVBW0UeyjoBnZTF4qk YE+KxWucIHrk3m/JkIOculz+T1f9LwwdxTkGKr6cV+7ov0wbLRU+KEsgLEhzX6hImCwL DwhNRB1sg1b0a80b6OV/T43tKvV7X0rK9pGHCPWlH7Jx1NP1JgLWqUzOLEfm0sJJApuL eLgw== X-Gm-Message-State: ALyK8tK+nsr0MHrjF8ZaHsWD9EJ6hlz83AarYJKmlbSP1TRY2Q8bl4LcI6hASGCsLu0NzpJOR/OHYGSpvdf7gAC+ X-Received: by 10.36.210.198 with SMTP id z189mr2982775itf.32.1466715985060; Thu, 23 Jun 2016 14:06:25 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.90.1 with HTTP; Thu, 23 Jun 2016 14:06:24 -0700 (PDT) From: Dragan Stancevic Date: Thu, 23 Jun 2016 16:06:24 -0500 Message-ID: To: Christophe Varoqui X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Thu, 23 Jun 2016 21:06:25 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Thu, 23 Jun 2016 21:06:25 +0000 (UTC) for IP:'209.85.214.49' DOMAIN:'mail-it0-f49.google.com' HELO:'mail-it0-f49.google.com' FROM:'dragan.stancevic@canonical.com' RCPT:'' X-RedHat-Spam-Score: 0.081 (BAYES_50, DKIM_SIGNED, DKIM_VALID, HTML_MESSAGE, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL) 209.85.214.49 mail-it0-f49.google.com 209.85.214.49 mail-it0-f49.google.com X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-Scanned-By: MIMEDefang 2.78 on 10.5.110.30 X-loop: dm-devel@redhat.com X-Mailman-Approved-At: Fri, 24 Jun 2016 03:58:03 -0400 Cc: device-mapper development Subject: [dm-devel] Subject: [PATCH 1/1] multipath-tools: fix dm- device filtering X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Virus-Scanned: ClamAV using ClamSMTP Hi Christophe, can you please take a look at the attached patch, we are seeing quite a few cases with the following errors: failed to get udev uid: Invalid argument failed to get sysfs uid: Invalid argument failed to get sgio uid: No such file or directory It causes a lot of confusion because the devices in question are in the blacklist but aren't getting filtered. I don't know the code well enough, but it seems that maybe there should be no condition in the filtering and the code should just be: if (dev && (filter_devnode(conf->blist_devnode, conf->elist_devnode, dev) > 0)) { But I went for smaller change option, by just allowing DEV_UEVENT to also be filtered. What do you think? Thanks. --- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel From 7dcf982221f1aa63226babaee2c41d8b0652b6d8 Mon Sep 17 00:00:00 2001 From: Dragan Stancevic 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 Cc: device-mapper development Signed-off-by: Dragan Stancevic --- multipath/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/multipath/main.c b/multipath/main.c index aadebec..d89298b 100644 --- a/multipath/main.c +++ b/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)) { -- 2.1.0