Else we might end up with bad device names in exclusiveDisks. See also 861d48e0dcca256cd3c0c5cd72ca7ceed1848e09 and 8b8cf4cbee86e5bfb00802b5d5ab617f9c5d5fab. Resolves: rhbz#744772 --- 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") -- 1.7.6.4 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list