summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2009-09-10 12:49:16 +0200
committerHans de Goede <hdegoede@redhat.com>2009-09-10 13:37:44 +0200
commit446942785400c5cace01f75d3981ca91e4898b63 (patch)
tree259dfb9ca738d6114419cec4f78aacdf8f4f3e41 /storage
parent740938fcf8d2e25b30c0dfc75d891e9dfaca5654 (diff)
downloadanaconda-446942785400c5cace01f75d3981ca91e4898b63.tar.gz
anaconda-446942785400c5cace01f75d3981ca91e4898b63.tar.xz
anaconda-446942785400c5cace01f75d3981ca91e4898b63.zip
Get DMRaidArrayDevice's a DiskLabel format when they are added to the tree
We were waiting for DMRaidArrayDevice's to be scanned before giving them a DiskLabel format, however this causes backtraces if a partition on the raid array gets scanned before the array itself: AttributeError: 'DeviceFormat' object has no attribute 'partedDisk'
Diffstat (limited to 'storage')
-rw-r--r--storage/devicetree.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/storage/devicetree.py b/storage/devicetree.py
index 9248cd688..9eec29996 100644
--- a/storage/devicetree.py
+++ b/storage/devicetree.py
@@ -1568,6 +1568,13 @@ class DeviceTree(object):
parents=[device])
self._addDevice(dm_array)
+
+ # Get the DMRaidArrayDevice a DiskLabel format *now*, in case
+ # its partitions get scanned before it does.
+ dm_array.updateSysfsPath()
+ dm_array_info = udev_get_block_device(dm_array.sysfsPath)
+ self.handleUdevDiskLabelFormat(dm_array_info, dm_array)
+
# Use the rs's object on the device.
# pyblock can return the memebers of a set and the
# device has the attribute to hold it. But ATM we