All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Marzinski <bmarzins@redhat.com>
To: Hannes Reinecke <hare@suse.de>
Cc: "dm-devel@redhat.com" <dm-devel@redhat.com>,
	Martin Wilck <Martin.Wilck@suse.com>
Subject: Re: [PATCH 2/7] multipathd: fix check_path errors with removed map
Date: Fri, 19 Jun 2020 11:30:03 -0500	[thread overview]
Message-ID: <20200619163003.GO5894@octiron.msp.redhat.com> (raw)
In-Reply-To: <a1df6c71-1427-9649-3e81-138ffcd04370@suse.de>

On Fri, Jun 19, 2020 at 08:32:34AM +0200, Hannes Reinecke wrote:
> >>
> >>fac68d7 is related to the famous "dm-multipath: Accept failed paths for
> >>multipath maps" patch (e.g.
> >>https://patchwork.kernel.org/patch/3368381/#7193001), which never made
> >>it upstream. SUSE kernels have shipped this patch for a long time, but
> >>we don't apply it any more in recent kernels.
> >>
> >>With this patch, The reinstate_path() failure would occur if multipathd
> >>had created a table with a "disabled" device (one which would be
> >>present in a dm map even though the actual block device didn't exist),
> >>and then tried to reinstate such a path. It sounds unlikely, but it
> >>might be possible if devices are coming and going in quick succession.
> >>In that situation, and with the "accept failed path" patch applied, a
> >>reload makes some sense, because reload (unlike reinstate) would not
> >>fail (at least not for this reason) and would actually add that just-
> >>reinstated path. OTOH, it's not likely that the reload would improve
> >>matters, either. After all, multipathd is just trying to reinstate a
> >>non-existing path. So, I'm fine with skipping the reload.
> >>
> It's actually _not_ unlikely, but a direct result of multipathd listening to
> uevents.
> 
> If you have a map with four paths, and all four of them are going down, you
> end up getting four events.
> And multipath will be processing each event _individually_, causing it to
> generate a reload sequence like:
> 
> [a b c d]
> [b c d]
> [c d]
> [d]
> []
> 
> Of which only the last is valid, as all the intermediate ones contain
> invalid paths.
> 
> And _that_ is the scenario I was referring to when creating the patch.

But even still, I'm not in favor of calling ev_add_path() with the code
as it currently is. In the case you point out, it will presumably fail
when adopt_paths() calls pathinfo(). That will orphan the path, which is
good. But if the map got removed (intentionally) instead of the path,
ev_add_path() will recreate the map, which is bad. Also, it seems more
likely for a path to still exist and be usable while the multipath
device is gone (the bad case), than for the path to pass the checker
function and then disappear before mutipathd tries to reinstate it
immediately afterwards (the good case).  Further, the bad result, where
a deleted multipath device reappears, is actually a problem for users.
Having multipathd take a bit of time and pointless effort to catch up
after multiple changes happen at once doesn't effect users noticeably.

Since the checkerloop thread spends the vast majority of it's not not
checking any specific path, if a path goes away, it is most likely to be
caught by the path_offline() function. I we want to do something to
proactively deal with a path that has been removed, we should do it
there.

-Ben
 
> Cheers,
> 
> Hannes
> -- 
> Dr. Hannes Reinecke            Teamlead Storage & Networking
> hare@suse.de                               +49 911 74053 688
> SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
> HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer

  reply	other threads:[~2020-06-19 16:30 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-18  0:24 [PATCH 0/7] Fix muitpath/multipathd flush issue Benjamin Marzinski
2020-06-18  0:24 ` [PATCH 1/7] libmultipath: change do_get_info returns Benjamin Marzinski
2020-06-18 15:27   ` Martin Wilck
2020-06-18 23:17     ` Benjamin Marzinski
2020-06-18  0:24 ` [PATCH 2/7] multipathd: fix check_path errors with removed map Benjamin Marzinski
2020-06-18 19:34   ` Martin Wilck
2020-06-18 23:17     ` Benjamin Marzinski
2020-06-19  6:32       ` Hannes Reinecke
2020-06-19 16:30         ` Benjamin Marzinski [this message]
2020-06-19 20:03           ` Martin Wilck
2020-06-19 13:42       ` Martin Wilck
2020-06-19 16:52         ` Benjamin Marzinski
2020-06-19 20:09           ` Martin Wilck
2020-06-18  0:24 ` [PATCH 3/7] libmultipath: make dm_flush_maps only return 0 on success Benjamin Marzinski
2020-06-18 20:29   ` Martin Wilck
2020-06-18  0:24 ` [PATCH 4/7] multipathd: add "del maps" multipathd command Benjamin Marzinski
2020-06-18 20:37   ` Martin Wilck
2020-06-18 23:12     ` Benjamin Marzinski
2020-06-19 13:35       ` Martin Wilck
2020-06-18  0:24 ` [PATCH 5/7] multipath: make flushing maps work like other commands Benjamin Marzinski
2020-06-18 20:38   ` Martin Wilck
2020-06-18  0:24 ` [PATCH 6/7] multipath: delegate flushing maps to multipathd Benjamin Marzinski
2020-06-18 20:40   ` Martin Wilck
2020-06-18  0:24 ` [PATCH 7/7] multipath: add option to skip multipathd delegation Benjamin Marzinski
2020-06-18 20:44   ` Martin Wilck
2020-06-18 23:15     ` Benjamin Marzinski
2020-06-18  9:00 ` [PATCH 0/7] Fix muitpath/multipathd flush issue Martin Wilck
2020-06-18 18:04   ` Benjamin Marzinski
2020-06-18 20:06     ` Martin Wilck
2020-06-18 23:06       ` Benjamin Marzinski
2020-07-01 20:54         ` Martin Wilck
2020-07-02  3:14           ` Benjamin Marzinski
2020-07-02 12:24             ` Martin Wilck
2020-07-02 15:18               ` Benjamin Marzinski
2020-07-02 16:45                 ` Martin Wilck
2020-07-02 19:41                   ` Benjamin Marzinski
2020-07-03 15:12                     ` Martin Wilck
2020-07-03 16:39                       ` Mike Snitzer
2020-07-03 18:50                         ` Martin Wilck

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=20200619163003.GO5894@octiron.msp.redhat.com \
    --to=bmarzins@redhat.com \
    --cc=Martin.Wilck@suse.com \
    --cc=dm-devel@redhat.com \
    --cc=hare@suse.de \
    /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.