[PATCH][f14] Make sure we have the container before the member arrays. (#642765)

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

 



The multipath identification function randomizes the ordering of the
list of devices to scan, and commit be910ee4b0288d48c introduced a second
call to storage.reset. md-controlled biosraids will already be active at
the time of the second reset (after autopart_type) so the various md
devices will be subject to unpredictable scan order. This patch makes an
attempt to get the container into the tree on demand in the case where
the member arrays are scanned before the container.
---
 pyanaconda/storage/devicetree.py |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/pyanaconda/storage/devicetree.py b/pyanaconda/storage/devicetree.py
index e0e4c42..bab37cb 100644
--- a/pyanaconda/storage/devicetree.py
+++ b/pyanaconda/storage/devicetree.py
@@ -1173,7 +1173,17 @@ class DeviceTree(object):
         elif udev_device_get_md_container(info):
             diskType = MDRaidArrayDevice
             parentName = devicePathToName(udev_device_get_md_container(info))
-            kwargs["parents"] = [ self.getDeviceByName(parentName) ]
+            container = self.getDeviceByName(parentName)
+            if container is None:
+                parent_path = os.path.dirname(sysfs_path) + "/" + parentName
+                new_info = udev_get_block_device(os.path.realpath(parent_path))
+                if new_info:
+                    self.addUdevDevice(new_info)
+                    container = self.getDeviceByName(parentName)
+                    if container is None:
+                        log.error("failure scanning device %s: could not add container %s" % (name, parentName))
+                        return
+            kwargs["parents"] = [container]
             kwargs["level"]  = udev_device_get_md_level(info)
             kwargs["memberDevices"] = int(udev_device_get_md_devices(info))
             kwargs["uuid"] = udev_device_get_md_uuid(info)
-- 
1.7.2.3

_______________________________________________
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