From patchwork Mon Dec 10 09:49:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Wilck X-Patchwork-Id: 10720927 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DC18C109C for ; Mon, 10 Dec 2018 09:50:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CB83F29BFF for ; Mon, 10 Dec 2018 09:50:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C036B29C21; Mon, 10 Dec 2018 09:50:32 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (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 374A329C04 for ; Mon, 10 Dec 2018 09:50:31 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D589AC058CD8; Mon, 10 Dec 2018 09:50:29 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 09535600D6; Mon, 10 Dec 2018 09:50:29 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 219E412E30; Mon, 10 Dec 2018 09:50:26 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id wBA9oNPL010727 for ; Mon, 10 Dec 2018 04:50:23 -0500 Received: by smtp.corp.redhat.com (Postfix) id E4E65600D7; Mon, 10 Dec 2018 09:50:23 +0000 (UTC) Delivered-To: dm-devel@redhat.com Received: from mx1.redhat.com (ext-mx12.extmail.prod.ext.phx2.redhat.com [10.5.110.41]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C613E6012B; Mon, 10 Dec 2018 09:50:21 +0000 (UTC) Received: from smtp2.provo.novell.com (smtp2.provo.novell.com [137.65.250.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 62A03308A94E; Mon, 10 Dec 2018 09:50:20 +0000 (UTC) Received: from apollon.suse.de.de (prv-ext-foundry1int.gns.novell.com [137.65.251.240]) by smtp2.provo.novell.com with ESMTP (TLS encrypted); Mon, 10 Dec 2018 02:50:14 -0700 From: Martin Wilck To: Christophe Varoqui Date: Mon, 10 Dec 2018 10:49:35 +0100 Message-Id: <20181210094959.11338-1-mwilck@suse.com> MIME-Version: 1.0 X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 216 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Mon, 10 Dec 2018 09:50:20 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Mon, 10 Dec 2018 09:50:20 +0000 (UTC) for IP:'137.65.250.81' DOMAIN:'smtp2.provo.novell.com' HELO:'smtp2.provo.novell.com' FROM:'mwilck@suse.com' RCPT:'' X-RedHat-Spam-Score: -2.301 (RCVD_IN_DNSWL_MED, SPF_PASS) 137.65.250.81 smtp2.provo.novell.com 137.65.250.81 smtp2.provo.novell.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.41 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: dm-devel@redhat.com Cc: dm-devel@redhat.com, Martin Wilck Subject: [dm-devel] [PATCH v3 00/24] multipath-tools: improve logging at -v3 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-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Mon, 10 Dec 2018 09:50:30 +0000 (UTC) X-Virus-Scanned: ClamAV using ClamSMTP Hi Christophe, most of the patches in this series reduce log levels of frequently printed messages at verbosity level 3. My goal was to limit the output of multipathd to one line per path per checker invocation, which is sufficient to track multipathd's view of path health in the logs. The standard setting of -v2 is not enough for post-mortem analysis of many failures. With this series, running multipathd with verbosity 3 becomes a realistic option even in production environments. So far the amount of output from multipathd with -v3 pretty much made this impossible, at least over longer time periods, and also made reading these logs very cumbersome due to the amount of redundant partly superfluos verbosity. I've taken care not to loose important information in the logs. Apart from that, the series fixes errors in the unit tests introduced by my last "checker overhaul" patch series (proving that I forgot to run the tests before submitting :-( ), and fixes a problem that I found while testing handling of a bad configuration (paths with size mismatch). Regards, Martin Changes in v3: Resent full series on Christophe's request. All patches except 22/24, 23/24 are the same as before. Added Ben's "Reviewed-by:" where appropriate. - 22/24: added one fix for a non-symbolic reference to a domap() return value, which I'd overlooked before. - 23/24: removed on Ben's review. The new 23/24 is just a code cleanup without functional change. Changes in v2: The first 19 patches are identical to v1 as ACK'd by Ben, except 16/24 "libmultipath: coalesce_paths: fix size mismatch handling". No. 8/24 "libmultipath: decrease log level of word splitting" (not yet ACKd by Ben) also stays the same; the issue Ben raised in his review is addressed in a separate patch, 20/24. 21/24 addresses implements Ben's suggestion to use named constants as return values in coalesce_paths(). 22, 23, 24 do the same for other important, related functions, as I found it strange to make this change just for coalesce_paths() alone. Martin Wilck (24): tests/hwtable: set multipath_dir in local configuration tests/hwtable: adjust to new checker API multipath-tools: decrease verbosity of state messages libmultipath: decrease verbosity of pathinfo messages libmultipath: decrease verbosity of TUR checker messages libmultipath: avoid frequent messages from filter_property() libmultipath: decrease log level of "disassembled" messages libmultipath: decrease log level of word splitting libmultipath: increase log level of map removal multipathd: decrease log level of checker timing libmultipath: decrease log level of "prioritizer refcount" message libmpathpersist/update_map_pr: decrease log level for nop libmultipath: simplify devt2devname() libmultipath: decrease log level for failed VPD c9 libmultipath: adopt_paths: check for size match libmultipath: coalesce_paths: fix size mismatch handling tests: add unit tests for bitmask functions multipathd: uev_remove_path: remove redundant orphan_paths call libmultipath: improve logging from orphan_paths libmultipath: avoid syslog loglevel > LOG_DEBUG coalesce_paths(): use symbolic return value domap(): use symbolic return value multipathd: simplify retry logic in ev_add_path() multipath: use symbolic return value and exit code libmpathpersist/mpath_persist.c | 3 +- libmultipath/blacklist.c | 54 +++++++------- libmultipath/blacklist.h | 2 +- libmultipath/checkers/tur.c | 6 +- libmultipath/configure.c | 48 +++++++------ libmultipath/configure.h | 23 ++++++ libmultipath/discovery.c | 20 +++--- libmultipath/dmparser.c | 6 +- libmultipath/log_pthread.c | 3 + libmultipath/prio.c | 2 +- libmultipath/structs_vec.c | 18 +++-- libmultipath/structs_vec.h | 3 +- libmultipath/util.c | 7 +- libmultipath/util.h | 16 +++++ multipath/main.c | 121 ++++++++++++++++++-------------- multipathd/cli_handlers.c | 5 +- multipathd/main.c | 45 ++++++------ tests/Makefile | 7 +- tests/blacklist.c | 7 +- tests/hwtable.c | 89 ++++++++++++----------- tests/util.c | 98 ++++++++++++++++++++++++++ 21 files changed, 383 insertions(+), 200 deletions(-)