[PATCH 2/3] Don't include incomplete md arrays in the devicetree.

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

 



---
 pyanaconda/storage/devicetree.py |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/pyanaconda/storage/devicetree.py b/pyanaconda/storage/devicetree.py
index 1e17a46..3a1f417 100644
--- a/pyanaconda/storage/devicetree.py
+++ b/pyanaconda/storage/devicetree.py
@@ -1660,6 +1660,18 @@ class DeviceTree(object):
         if self.unusedRaidMembers and not self._cleanup and self.intf:
             self.intf.unusedRaidMembersWarning(self.unusedRaidMembers)
 
+        # remove md array devices for which we did not find all members
+        for array in self.getDevicesByType("mdarray"):
+            if array.memberDevices > len(array.parents):
+                self._recursiveRemove(array)
+
+    def _recursiveRemove(self, device):
+        for d in self.getChildren(device):
+            self._recursiveRemove(d)
+
+        device.teardown()
+        self._removeDevice(device)
+
     def _setupLvs(self):
         ret = False
 
-- 
1.7.3.5

_______________________________________________
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