FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Mobile and Embedded

 
 
LinkBack Thread Tools
 
Old 06-10-2010, 07:47 PM
Hans de Goede
 
Default 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
 

Thread Tools




All times are GMT. The time now is 09:36 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org