dm-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: "Benjamin Marzinski" <bmarzins@redhat.com>
To: Hannes Reinecke <hare@suse.de>
Cc: dm-devel@redhat.com, mgandhi@redhat.com
Subject: Re: [Patch] multipath-tools: Check if multipathd is running or not and print a warning
Date: Fri, 29 Jul 2016 11:02:52 -0500	[thread overview]
Message-ID: <20160729160252.GD26062@octiron.msp.redhat.com> (raw)
In-Reply-To: <d46dea9f-5b9d-4ffe-7c44-47603d580eca@suse.de>

On Thu, Jul 28, 2016 at 04:35:21PM +0200, Hannes Reinecke wrote:
> On 07/28/2016 01:48 PM, Milan P. Gandhi wrote:
> > Hello,
> > 
> > With this patch dm-multipath commands e.g. multipath -v2,
> > multipath -ll etc. now checks if there are multipath
> > device maps created, and multipathd service is running 
> > or not? If the multipath devices are created, but multipathd 
> > service is not running then there will be a warning 
> > message displayed to inform the user that IO failover/
> > failback may not work as expected without multipathd 
> > process running.
> > 
> > I have tested this patch with Fedora 23, and latest 
> > upstream multipath-tools
> > 
> > Signed-off-by: Milan P. Gandhi <mgandhi@redhat.com>
> > ---
> No, this won't work.
> 
> You cannot guarantee that by the time 'multipath' is called the daemon
> was already able to create any maps (the daemon might still be
> processing events, without it being able to start creating maps).
> 
> So the best we can do is to check if the daemon is running
> and continue from there.

I'm a little confused here.  All that this is assuming is that
multipathd has user event listener thread started. This happens before
it has even run the initial configure to pick up already existing
devices. The other way of checking if the multipathd daemon is running
would be to look at the pidfile, right? Are you really worried that
people will often be creating devices with the multipath command in the
window between when multipathd locks the pidfile, and when it can
receive user commands? Otherwise, I don't see your how your suggestion
would make a difference. Perhaps, I'm misunderstanding you. 

It seems like, in most cases, multipathd should have been started during
bootup, long before the multipath command would ever get called to
create a device, and these checks are only happening when multipath is
actually creating a device, so the calls to see if a device is a valid
path device (-c or -u) won't trigger this warning. Or am I missing
something here?

-Ben

> 
> Cheers,
> 
> Hannes
> -- 
> Dr. Hannes Reinecke		   Teamlead Storage & Networking
> hare@suse.de			               +49 911 74053 688
> SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
> GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
> HRB 21284 (AG Nürnberg)
> 
> --
> dm-devel mailing list
> dm-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/dm-devel

      reply	other threads:[~2016-07-29 16:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-28 11:48 [Patch] multipath-tools: Check if multipathd is running or not and print a warning Milan P. Gandhi
2016-07-28 14:35 ` Hannes Reinecke
2016-07-29 16:02   ` Benjamin Marzinski [this message]

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=20160729160252.GD26062@octiron.msp.redhat.com \
    --to=bmarzins@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=hare@suse.de \
    --cc=mgandhi@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 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).