All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Wilck <mwilck@suse.com>
To: dm-devel@redhat.com
Subject: [PATCH 16/33] multipath: ignore -i if find_multipaths is set
Date: Tue, 28 Feb 2017 17:23:12 +0100	[thread overview]
Message-ID: <20170228162329.14517-17-mwilck@suse.com> (raw)
In-Reply-To: <20170228162329.14517-1-mwilck@suse.com>

multipath's logic for detecing new multipath devices with find_multipaths
currently doesn't work reliably. If paths for a new device are added
sequentially, the first one will be classified as non-multpath (and passed on
to systemd for further processing) while subsequent ones will be seen as
multipath devices. If the paths are added simultaneously (such as at udev
trigger time after switching from the initrd to the rootfs, if device
detection is already finished), whether or not additional paths will be seen
when the udev rules for a given paths are processed is random.
A proper implementation of this device detection would require some sort of
information passing between multipathd and multipath, timeouts waiting for
additional paths to appear when a single one is detected, retriggering of
uevents if the status of a given paths changes, and more fine-grained
treatment of "orphaned" paths in multipathd. All of that is currently
non-existent.

Currently, our only option is to rely on the wwids file for device setup with
find_multipaths. In practice, that means that multipath maps will only be
set up for such devices that have been set up manually by the user before.
This is the behavior of multipath [-c|-u] without the "-i" option.

But "-i" is useful for the !find_multipaths case, where the expectation is
that all non-blacklisted devices are multipathed by default. Because we
can't change the multipath invocation in the udev rules file
depending on the find_multipaths setting, just ignore "-i" if find_multipaths
is set.

Signed-off-by: Martin Wilck <mwilck@suse.com>
---
 multipath/main.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/multipath/main.c b/multipath/main.c
index 8ce87a08..ed57135a 100644
--- a/multipath/main.c
+++ b/multipath/main.c
@@ -619,6 +619,16 @@ main (int argc, char *argv[])
 		}
 	}
 
+	/*
+	 * FIXME: new device detection with find_multipaths currently
+	 * doesn't work reliably.
+	 */
+	if (cmd ==  CMD_VALID_PATH &&
+	    conf->find_multipaths && conf->ignore_wwids) {
+		condlog(2, "ignoring -i flag because find_multipath is set in multipath.conf");
+		conf->ignore_wwids = 0;
+	}
+
 	if (getuid() != 0) {
 		fprintf(stderr, "need to be root\n");
 		exit(1);
-- 
2.11.0

  parent reply	other threads:[~2017-02-28 16:23 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-28 16:22 [PATCH 00/33] multipath-tools fixes from SUSE Martin Wilck
2017-02-28 16:22 ` [PATCH 01/33] multipathd.service: fixup Wants= and Before= statements Martin Wilck
2017-03-13 23:06   ` Benjamin Marzinski
2017-03-14  7:36     ` Martin Wilck
2017-02-28 16:22 ` [PATCH 02/33] multipathd: start daemon after udev trigger Martin Wilck
2017-02-28 16:22 ` [PATCH 03/33] Add support for "multipath=off" and "nompath" on kernel cmdline Martin Wilck
2017-02-28 16:23 ` [PATCH 04/33] multipath: do not check daemon from udev rules Martin Wilck
2017-04-05 21:54   ` Benjamin Marzinski
2017-04-06 12:10     ` Martin Wilck
2017-02-28 16:23 ` [PATCH 05/33] Invalid error code when using multipathd CLI Martin Wilck
2017-02-28 16:23 ` [PATCH 06/33] multipathd: set timeout for CLI commands correctly Martin Wilck
2017-04-05 22:07   ` Benjamin Marzinski
2017-04-12 20:26     ` Martin Wilck
2017-04-13 13:11     ` [PATCH] Revert "multipathd: set timeout for CLI commands correctly" Martin Wilck
2017-02-28 16:23 ` [PATCH 07/33] libmultipath: fall back to search paths by devt Martin Wilck
2017-02-28 16:23 ` [PATCH 08/33] libmultipath: Do not crash on empty features Martin Wilck
2017-02-28 16:23 ` [PATCH 09/33] multipathd: Set CLI timeout correctly Martin Wilck
2017-02-28 16:23 ` [PATCH 10/33] multipath: avoid crash when using modified configuration Martin Wilck
2017-02-28 16:23 ` [PATCH 11/33] multipathd: issue systemd READY after initial configuration Martin Wilck
2017-02-28 16:23 ` [PATCH 12/33] libmultipath/discovery: do not cache 'access_state' sysfs attribute Martin Wilck
2017-02-28 16:23 ` [PATCH 13/33] libmultipath: use existing alias from bindings file Martin Wilck
2017-02-28 16:23 ` [PATCH 14/33] multipath -ll: set DI_SERIAL Martin Wilck
2017-02-28 16:23 ` [PATCH 15/33] libmultipath: move suspend logic to _dm_flush_map Martin Wilck
2017-04-05 22:44   ` Benjamin Marzinski
2017-04-12 20:54     ` Martin Wilck
2017-04-13 13:05     ` [PATCH] libmultipath: fix skip_kpartx support for removing maps Martin Wilck
2017-04-14  8:42       ` Christophe Varoqui
2017-02-28 16:23 ` Martin Wilck [this message]
2017-02-28 16:23 ` [PATCH 17/33] multipathd: imply -n if find_multipaths is set Martin Wilck
2017-04-05 23:03   ` Benjamin Marzinski
2017-04-12 21:36     ` Martin Wilck
2017-04-13 21:54       ` Benjamin Marzinski
2017-02-28 16:23 ` [PATCH 18/33] multipathd: use weaker "force_reload" at startup Martin Wilck
2017-02-28 16:23 ` [PATCH 19/33] libmultipath: setup_features: log msg if queue_if_no_path is ignored Martin Wilck
2017-02-28 16:23 ` [PATCH 20/33] libmultipath: setup_feature: print log msg if no_path_retry cant be set Martin Wilck
2017-02-28 16:23 ` [PATCH 21/33] libmultipath: setup_feature: handle "retain_attached_hw_handler" Martin Wilck
2017-02-28 16:23 ` [PATCH 22/33] libmultipath: disassemble_map: skip no_path_retry check Martin Wilck
2017-02-28 16:23 ` [PATCH 23/33] libmultipath: disassemble_map: treat minio like assemble_map does Martin Wilck
2017-02-28 16:23 ` [PATCH 24/33] libmultipath: select_action: check special features separately Martin Wilck
2017-02-28 16:23 ` [PATCH 25/33] libmultipath: sysfs_attr_set_value: use const char* Martin Wilck
2017-02-28 16:23 ` [PATCH 26/33] libmultipath: reload map if not known to udev Martin Wilck
2017-02-28 16:23 ` [PATCH 27/33] libmultipath: differentiate ACT_NOTHING and ACT_IMPOSSIBLE Martin Wilck
2017-02-28 16:23 ` [PATCH 28/33] libmultipath: coalesce_paths: trigger uevent if nothing done Martin Wilck
2017-02-28 16:23 ` [PATCH 29/33] kpartx: sanitize delete partitions Martin Wilck
2017-02-28 16:23 ` [PATCH 30/33] tur: Add pthread_testcancel() Martin Wilck
2017-02-28 16:23 ` [PATCH 31/33] multipathd: fixup check for new path states Martin Wilck
2017-02-28 16:23 ` [PATCH 32/33] libmultipath/checkers: make RADOS checker optional Martin Wilck
2017-02-28 16:23 ` [PATCH 33/33] Make libdmmp build optional Martin Wilck
2017-02-28 22:44 ` [PATCH 00/33] multipath-tools fixes from SUSE Xose Vazquez Perez
2017-03-01  8:12   ` Martin Wilck
2017-03-23 18:43     ` multipath-tools (patch): Do not select sysfs prioritizer for RDAC arrays (was Re: [PATCH 00/33] multipath-tools fixes from SUSE) Xose Vazquez Perez
2017-03-23 20:40       ` Stewart, Sean
2017-03-22 19:02 ` [PATCH 00/33] multipath-tools fixes from SUSE Xose Vazquez Perez
2017-03-22 21:29   ` Christophe Varoqui
2017-03-23  8:30     ` Christophe Varoqui
2017-03-24  7:44       ` Martin Wilck
2017-04-12  7:38         ` Christophe Varoqui

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170228162329.14517-17-mwilck@suse.com \
    --to=mwilck@suse.com \
    --cc=dm-devel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.