[PATCH] BIOS RAID sets get shown double when adding advanced storage (#574714)

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

 



FilterWindow.populate() will scan for BIOS RAID sets and add them on
every invocation. This causes them to be added multiple times if
FilterWindow.populate() get called multiple times. This happens for
example when adding an iSCSI target using the "add Advanced target"
button on a machine which has a BIOS RAID set.

Also since the second populate call will not have any of the raid set
members as argument, fstype cannot be determined, and the set shows
up in the Basic Devices tab rather then in the Firmware RAID tab.
---
 iw/filter_gui.py |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/iw/filter_gui.py b/iw/filter_gui.py
index 136a3e7..2f9a85a 100644
--- a/iw/filter_gui.py
+++ b/iw/filter_gui.py
@@ -663,7 +663,7 @@ class FilterWindow(InstallWindow):
                      udev_device_get_serial(d), ident, "", "", "", "")
             _addTuple(tuple)
 
-        if flags.dmraid:
+        if raids and flags.dmraid:
             used_raidmembers = []
             for rs in block.getRaidSets():
                 # dmraid does everything in sectors
@@ -675,12 +675,17 @@ class FilterWindow(InstallWindow):
                 members = filter(lambda m: isinstance(m, block.device.RaidDev),
                                  list(rs.get_members()))
                 members = map(lambda m: m.get_devpath(), members)
-                used_raidmembers.extend(members)
                 for d in raids:
                     if udev_device_get_name(d) in members:
                         fstype = udev_device_get_format(d)
                         break
 
+                # Skip this set if none of its members are in the raids list
+                if not fstype:
+                    continue
+
+                used_raidmembers.extend(members)
+
                 # biosraid devices don't really get udev data, at least not in a
                 # a way that's useful to the filtering UI.  So we need to fake
                 # that data now so we have something to put into the store.
-- 
1.7.0

_______________________________________________
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