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

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



---
 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


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