[PATCH 3/3] 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 |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/iw/filter_gui.py b/iw/filter_gui.py
index d6f0263..8184e98 100644
--- a/iw/filter_gui.py
+++ b/iw/filter_gui.py
@@ -431,7 +431,7 @@ class FilterWindow(InstallWindow):
         mpaths = filter(lambda d: d not in self._cachedMPaths, new_mpaths)
         raids = filter(lambda d: d not in self._cachedRaidDevices, new_raids)
 
-        self.populate(nonraids, mpaths, raids)
+        self.populate(nonraids, mpaths, raids, False)
 
         # Make sure to update the size label at the bottom.
         self.pages[0].cb.update()
@@ -576,7 +576,7 @@ class FilterWindow(InstallWindow):
                           self._makeMPath(), self._makeOther(),
                           self._makeSearch()]
 
-        self.populate(nonraids, mpaths, raids)
+        self.populate(nonraids, mpaths, raids, True)
 
         # If the "Add Advanced" button is ever clicked, we need to have a list
         # of what devices previously existed so we know what's new.  Then we
@@ -597,7 +597,7 @@ class FilterWindow(InstallWindow):
 
         return self.vbox
 
-    def populate(self, nonraids, mpaths, raids):
+    def populate(self, nonraids, mpaths, raids, firstTime):
         def _addTuple(tuple):
             global totalDevices, totalSize
             global selectedDevices, selectedSize
@@ -663,7 +663,7 @@ class FilterWindow(InstallWindow):
                      udev_device_get_serial(d), ident, "", "", "", "")
             _addTuple(tuple)
 
-        if flags.dmraid:
+        if flags.dmraid and firstTime:
             used_raidmembers = []
             for rs in block.getRaidSets():
                 # dmraid does everything in sectors
-- 
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