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

[PATCH 2/2] Don't crash when broken md devices are present. (#731177)



---
 pyanaconda/storage/devicetree.py |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/pyanaconda/storage/devicetree.py b/pyanaconda/storage/devicetree.py
index 25331c2..b865302 100644
--- a/pyanaconda/storage/devicetree.py
+++ b/pyanaconda/storage/devicetree.py
@@ -754,8 +754,12 @@ class DeviceTree(object):
         # something must be wrong -- if all of the slaves we in
         # the tree, this device should be as well
         if device is None:
-            raise DeviceTreeError("MD RAID device %s not in devicetree after "
-                                  "scanning all slaves" % name)
+            log.error("failed to scan md array %s" % name)
+            try:
+                devicelibs.mdraid.mddeactivate("/dev/" + name)
+            except MDRaidError:
+                log.error("failed to stop broken md array %s" % name)
+
         return device
 
     def addUdevPartitionDevice(self, info, disk=None):
-- 
1.7.6


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