Raise an error when an md dev is not in the tree after scanning all slaves
As the comment already indicates when this happens something is seriously
wrong. I've seen this code get triggered one or 2 times with BIOS RAID and in both cases the cause was a bug elsewhere in anaconda. So rather then the current "just wing it" solution, just raise an exception when this happens. --- pyanaconda/storage/devicetree.py | 20 ++------------------ 1 files changed, 2 insertions(+), 18 deletions(-) diff --git a/pyanaconda/storage/devicetree.py b/pyanaconda/storage/devicetree.py index 8ee8671..7b6da53 100644 --- a/pyanaconda/storage/devicetree.py +++ b/pyanaconda/storage/devicetree.py @@ -1069,24 +1069,8 @@ 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: - log.warning("using MD RAID device for %s" % name) - try: - # level is reported as, eg: "raid1" - md_level = udev_device_get_md_level(info) - md_devices = int(udev_device_get_md_devices(info)) - md_uuid = udev_device_get_md_uuid(info) - except (KeyError, IndexError, ValueError) as e: - log.warning("invalid data for %s: %s" % (name, e)) - return - - device = MDRaidArrayDevice(name, - level=md_level, - memberDevices=md_devices, - uuid=md_uuid, - exists=True, - parents=slaves) - self._addDevice(device) - + raise DeviceTreeError("MD RAID device %s not in devicetree after " + "scanning all slaves" % name) return device def addUdevPartitionDevice(self, info, disk=None): -- 1.7.0.1 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@redhat.com https://www.redhat.com/mailman/listinfo/anaconda-devel-list |
| All times are GMT. The time now is 07:06 PM. |
VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.