Re: [rhel6-branch] mpath: flush more eagerly in filter_gui.

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

 



On Thu, 2011-10-13 at 09:38 +0200, Ales Kozumplik wrote:
> Else we might end up with bad device names in exclusiveDisks.
> 
> See also 861d48e0dcca256cd3c0c5cd72ca7ceed1848e09 and
> 8b8cf4cbee86e5bfb00802b5d5ab617f9c5d5fab.
> 
> Resolves: rhbz#744772

Ack.

> ---
>  iw/filter_gui.py            |   14 ++++++--------
>  storage/devicelibs/mpath.py |    6 ++++++
>  2 files changed, 12 insertions(+), 8 deletions(-)
> 
> diff --git a/iw/filter_gui.py b/iw/filter_gui.py
> index 0c29c16..6da510d 100644
> --- a/iw/filter_gui.py
> +++ b/iw/filter_gui.py
> @@ -629,15 +629,13 @@ class FilterWindow(InstallWindow):
>          with open("/etc/multipath.conf", "w+") as mpath_cfg:
>              mpath_cfg.write(cfg)
>  
> -        if anaconda.isKickstart:
> -            # identifyMultipaths() uses 'multipath -d' to find mpath devices. In
> -            # case this is an interactive kickstart install, it wouldn't display
> -            # those already set up during the early storageInitialize() unless
> -            # we flush them first.
> -            log.info("filter_gui: flushing all multipath devices.")
> -            iutil.execWithRedirect("multipath", ["-F"])
> -        (singlepaths, mpaths, partitions) = identifyMultipaths(disks)
> +        # identifyMultipaths() uses 'multipath -d' and 'multipath -ll' to find
> +        # mpath devices. In case there are devices already set up they won't
> +        # show up (or show up with a wrong name). Flush those first.
> +        log.info("filter_gui: flushing all multipath devices.")
> +        flush_mpaths()
>  
> +        (singlepaths, mpaths, partitions) = identifyMultipaths(disks)
>          # The device list could be really long, so we really only want to
>          # iterate over it the bare minimum of times.  Dividing this list up
>          # now means fewer elements to iterate over later.
> diff --git a/storage/devicelibs/mpath.py b/storage/devicelibs/mpath.py
> index eb6e999..789add1 100644
> --- a/storage/devicelibs/mpath.py
> +++ b/storage/devicelibs/mpath.py
> @@ -303,3 +303,9 @@ blacklist {
>          ret += '}\n'
>  
>          return ret
> +
> +def flush_mpaths():
> +    iutil.execWithRedirect("multipath", ["-F"])
> +    check_output = iutil.execWithCapture("multipath", ["-ll"]).strip()
> +    if check_output:
> +        log.error("multipath: some devices could not be flushed")


_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux