Re: [PATCH] dracut: Verify multipath config_dir option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Milan,

thanks a lot for your response. I'm fine with your suggestions.

On Fri, 2020-01-31 at 13:28 +0530, Milan P. Gandhi wrote:
> On Wed, Jan 29, 2020 at 10:49:21AM +0100, Martin Wilck wrote:
> > 
> > The path (/usr/sbin/multipath) is inconsistent with what we use in
> > multipathd.service (/sbin/multipath). I'm not against changing this
> > to
> > /usr, but we should be consistent.
> 
> I used (/usr/sbin/multipath) because location of multipath binary is
> shown in /usr/sbin. I will change it to /sbin/multipath to make it
> more
> consistent with the systemctl output for multipathd.service

Well, Fedora made the /usr move, which openSUSE hasn't completed yet.
In general IMO using /usr/sbin is fine, distributions can
patch this as it fits. But for clarity, the move should be made in a
separate patch, so I for your patch, sticking with /sbin is better.

> $ whereis multipath
> multipath: /usr/sbin/multipath /usr/lib64/multipath [...]
>  
> > And: fall back to /etc/multipath/conf.d if the command fails for
> > some
> > reason?
> 
> The 'multipath -t' command runs successfully even when multipathd
> itself
> is stopped. And config_dir option is one of the built-in parameters,
> so
> if users do not modify it then it is automatically set to 
> /etc/multipath/conf.d

Right, that makes sense. If "multipath -t" fails, something is really
fishy and we should probably error out.

> I can add a check to verify if the config_dir parameter read from
> multipath -t is an actual directory, and if not, fall back to above
> default path - /etc/multipath/conf.d

I'm not sure about that. If config_dir exists and is not a directory,
we should error out. If it doesn't exist, we should just skip it. 

Btw, while you are at it: There's also the "multipath_dir" config
option that specifies the location of the "plugin" libraries for
multipath. This stuff is currently installed via 

   inst_libdir_file "libmultipath*" "multipath/"

But in theory at least, users can change this directory, and if dracut
supports a modified "config_dir", it might as well support a modified
"multipath_dir." You may argue that that's unlikely to be modified, but
the same can be said about config_dir. Just a suggestion.

Regards
Martin






[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux