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

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



On 03/11/2011 08:05 PM, David Lehman wrote:
---
  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


Ack.

Ales


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