----- Original Message -----
From: "David Lehman" dlehman@redhat.com To: anaconda-patches@lists.fedorahosted.org Sent: Friday, August 1, 2014 12:16:02 AM Subject: [PATCH 1/3] Remove an obsolete block related to unpredictable md device names.
The functionality this block originally provided should be covered by the UUID lookup we do in addUdevMDDevice.
This block no longer works because it relies on md-specific data being in the udev database itself, which is no longer the case. It hasn't been since we removed anaconda's udev rules.
blivet/devicetree.py | 36 ++---------------------------------- 1 file changed, 2 insertions(+), 34 deletions(-)
diff --git a/blivet/devicetree.py b/blivet/devicetree.py index a6b14d8..f8fc112 100644 --- a/blivet/devicetree.py +++ b/blivet/devicetree.py @@ -1594,42 +1594,10 @@ class DeviceTree(object): log.warning("invalid data for %s: no RAID level", device.name) return
md_metadata = Nonemd_name = None# check the list of devices udev knows about to see if the array# this device belongs to is already activefor dev in udev.get_devices():if not udev.device_is_md(dev):continuetry:dev_uuid = udev.device_get_md_uuid(dev)dev_level = udev.device_get_md_level(dev)except KeyError:continueif dev_uuid is None or dev_level is None:continueif dev_uuid == md_uuid and dev_level == md_level:md_name = udev.device_get_md_name(dev)md_metadata = udev.device_get_md_metadata(dev)if not md_name:# containers don't typically have names and theyalso
# don't have a symlink in /dev/mdmd_name = udev.device_get_name(dev)if md_level != "container" and \re.match(r'md\d+$', md_name):# md0 -> 0md_name = md_name[2:]break# mdexamine yields MD_METADATA only for metadata version > 0.90 # if MD_METADATA is missing, assume metadata version is 0.90md_metadata = md_metadata orudev.device_get_md_metadata(md_info) or "0.90"
md_metadata = udev.device_get_md_metadata(md_info) or "0.90"md_name = udev.device_get_md_name(md_info) if not md_name: md_path = md_info.get("DEVICE", "") if md_path:-- 1.9.3
anaconda-patches mailing list anaconda-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
Ack.
- mulhern