From: "Benjamin Marzinski" <bmarzins@redhat.com>
To: John Stoffel <john@stoffel.org>
Cc: device-mapper development <dm-devel@redhat.com>,
Christophe Varoqui <christophe.varoqui@gmail.com>
Subject: Re: [PATCH 10/17] multipathd: delay reloads during creation
Date: Tue, 29 Mar 2016 19:57:31 -0500 [thread overview]
Message-ID: <20160330005731.GH2915@octiron.msp.redhat.com> (raw)
In-Reply-To: <22266.35585.347696.835499@quad.stoffel.home>
On Tue, Mar 29, 2016 at 10:02:41AM -0400, John Stoffel wrote:
> >>>>> "Benjamin" == Benjamin Marzinski <bmarzins@redhat.com> writes:
>
> Benjamin> lvm needs PV devices to not be suspended while the udev
> Benjamin> rules are running, for them to be correctly identified as
> Benjamin> PVs. However, multipathd will often be in a situation where
> Benjamin> it will create a multipath device upon seeing a path, and
> Benjamin> then immediately reload the device upon seeing another path.
> Benjamin> If multipath is reloading a device while processing the udev
> Benjamin> event from its creation, lvm can fail to identify it as a
> Benjamin> PV. This can cause systems to fail to boot. Unfortunately,
> Benjamin> using udev synchronization cookies to solve this issue would
> Benjamin> cause a host of other issues that could only be avoided by a
> Benjamin> pretty substantial change in how multipathd does locking and
> Benjamin> event processing. The good news is that multipathd is
> Benjamin> already listening to udev events itself, and can make sure
> Benjamin> that it isn't reloading when it shouldn't be.
>
> Benjamin> This patch makes multipathd delay or refuse any reloads that
> Benjamin> would happen between the time when it creates a device, and
> Benjamin> when it receives the change uevent from the device
> Benjamin> creation. The only reloads that it refuses are from the
> Benjamin> multipathd interactive commands that make no sense on a not
> Benjamin> fully started device. Otherwise, it processes the event or
> Benjamin> command, and sets a flag to either mark that device for an
> Benjamin> update, or to signal that multipathd needs a
> Benjamin> reconfigure. When the udev event for the creation arrives,
> Benjamin> multipath will reload the device if necessary. If a
> Benjamin> reconfigure has been requested, and no devices are currently
> Benjamin> being created, multipathd will also do the reconfigure then.
>
> Benjamin> Also this patch adds a configurable timer
> Benjamin> "missing_uev_msg_delay" defaulting to 30 seconds. If the
> Benjamin> udev creation event has not arrived after this timeout has
> Benjamin> triggered, multipathd will start printing messages alerting
> Benjamin> the user of this every "missing_uev_msg_delay" seconds.
>
> Should this really keep printing this message every 30 seconds for
> eternity? I would think that having it give up after 30 * N seconds
> would be better instead. I'm worried that this might block or slow
> down system boots forever, instead of at least failing and falling
> through so that maybe something can be recovered here.
Fair enough. I should probably lower that timer, and after (timer *
some_max_retries) seconds have passed, just stop waiting, and let the
reloads go ahead. However, as this is, it isn't too likely to interfere
with bootup. It won't do anything to stop the multipath devices from
being created, just reloaded.
> Basically, what can the user do if they start getting these messages?
> We should prompt them with a possible cause/solution if at all
> possible.
All that the user could do would be to override the waiting, which is
just what multipathd could do automatically. If we've already waited a
while for the event and haven't received it, we're unlikely to have it
come through while we are reloading. Also, the risk is the same for a
person manually fixing it and for multipathd automatically doing it, so
it seems like multipath should just automatically just stop waiting in
this case.
-Ben
> John
next prev parent reply other threads:[~2016-03-30 0:57 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-29 3:12 [PATCH 00/17] Multipath patch sync Benjamin Marzinski
2016-03-29 3:12 ` [PATCH 01/17] multipathd: use /run instead of /var/run Benjamin Marzinski
2016-03-29 13:57 ` John Stoffel
2016-03-30 0:41 ` Benjamin Marzinski
2016-03-30 16:06 ` John Stoffel
2016-03-29 3:12 ` [PATCH 02/17] retrigger uevents to try and get the uid through udev Benjamin Marzinski
2016-03-29 3:13 ` [PATCH 03/17] Fix issues with user_friendly_names initramfs bindings Benjamin Marzinski
2016-03-29 3:13 ` [PATCH 04/17] Add libmpathcmd library and use it internally Benjamin Marzinski
2016-03-29 3:13 ` [PATCH 05/17] libmultipath: add ignore_new_boot_devs option Benjamin Marzinski
2016-03-29 3:13 ` [PATCH 06/17] libmultipath: fix PAD and PRINT macros Benjamin Marzinski
2016-03-29 3:13 ` [PATCH 07/17] libmultipath: Cut down on alua prioritizer ioctls Benjamin Marzinski
2016-03-29 3:13 ` [PATCH 08/17] multipathd: fail if pidfile can't be created Benjamin Marzinski
2016-03-29 3:13 ` [PATCH 09/17] libmultipath: check correct function for define Benjamin Marzinski
2016-03-29 3:13 ` [PATCH 10/17] multipathd: delay reloads during creation Benjamin Marzinski
2016-03-29 14:02 ` John Stoffel
2016-03-30 0:57 ` Benjamin Marzinski [this message]
2016-03-29 3:13 ` [PATCH 11/17] multipath: Fix minor text issues Benjamin Marzinski
2016-03-29 3:13 ` [PATCH 12/17] kpartx: verify partition devices Benjamin Marzinski
2016-03-29 3:13 ` [PATCH 13/17] multipath: add exclusive_pref_bit for alua prio Benjamin Marzinski
2016-03-29 3:13 ` [PATCH 14/17] multipathd: print "fail" when remove fails Benjamin Marzinski
2016-03-29 3:13 ` [PATCH 15/17] multipath: check partitions unused before removing Benjamin Marzinski
2016-03-29 3:13 ` [PATCH 16/17] multipathd.service: remove blk-availability Requires Benjamin Marzinski
2016-03-29 3:13 ` [PATCH 17/17] multipathd: use 64-bit int for command key Benjamin Marzinski
2016-04-07 2:10 ` multipathd: segfault in multipathd cli_add_map() Zhangguanghui
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=20160330005731.GH2915@octiron.msp.redhat.com \
--to=bmarzins@redhat.com \
--cc=christophe.varoqui@gmail.com \
--cc=dm-devel@redhat.com \
--cc=john@stoffel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).