Re: [PATCH] Get DMRaidArrayDevice's a DiskLabel format when they are added to the tree

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

 



looks ok.
On Thu, Sep 10, 2009 at 12:54:43PM +0200, Hans de Goede wrote:
> 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'
> ---
>  storage/devicetree.py |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)
> 
> diff --git a/storage/devicetree.py b/storage/devicetree.py
> index 9248cd6..9eec299 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
> -- 
> 1.6.4.2
> 
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list

-- 
Joel Andres Granados
Brno, Czech Republic, Red Hat.

Attachment: pgp3wgs6zsNfF.pgp
Description: PGP signature

_______________________________________________
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