[PATCH 1/3] Don't crash because we don't support linear md. (#646157)

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

 



The right thing to do is to add support for linear arrays but there
is enough code that expects the raid level to be a number that this
will have to wait until someone has time to change all that.
---
 pyanaconda/storage/devicetree.py |   19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/pyanaconda/storage/devicetree.py b/pyanaconda/storage/devicetree.py
index 870140e..743760d 100644
--- a/pyanaconda/storage/devicetree.py
+++ b/pyanaconda/storage/devicetree.py
@@ -1416,13 +1416,18 @@ class DeviceTree(object):
 
             log.info("using name %s for md array containing member %s"
                         % (md_name, device.name))
-            md_array = MDRaidArrayDevice(md_name,
-                                         level=md_level,
-                                         minor=minor,
-                                         memberDevices=md_devices,
-                                         uuid=md_uuid,
-                                         sysfsPath=sysfs_path,
-                                         exists=True)
+            try:
+                md_array = MDRaidArrayDevice(md_name,
+                                             level=md_level,
+                                             minor=minor,
+                                             memberDevices=md_devices,
+                                             uuid=md_uuid,
+                                             sysfsPath=sysfs_path,
+                                             exists=True)
+            except ValueError as e:
+                log.error("failed to create md array: %s" % e)
+                return
+
             md_array._addDevice(device)
             self._addDevice(md_array)
 
-- 
1.7.3.4

_______________________________________________
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