Re: [PATCH 1/4] Ignore active fwraids and mpaths when setting up the filter ui.

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

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 07/15/2010 11:51 AM, David Lehman wrote:
> We'll identify them by examining the component devices, so don't
> even look at the fwraid/mpath devices themselves, if there are any.
> 
> Related: rhbz#596468
> ---
>  iw/filter_gui.py |   13 +++++++++++--
>  1 files changed, 11 insertions(+), 2 deletions(-)
> 
> diff --git a/iw/filter_gui.py b/iw/filter_gui.py
> index 4552491..43acfad 100644
> --- a/iw/filter_gui.py
> +++ b/iw/filter_gui.py
> @@ -432,7 +432,11 @@ class FilterWindow(InstallWindow):
>              return
>  
>          udev_trigger(subsystem="block")
> -        new_disks = filter(udev_device_is_disk, udev_get_block_devices())
> +        new_disks = filter(lambda d: udev_device_is_disk(d) and \
> +                                     not udev_device_is_dm(d) and \
> +                                     not udev_device_is_md(d) and \
> +                                     not udev_device_get_md_container(d),
> +                           udev_get_block_devices())
>  
>          mcw = MultipathConfigWriter()
>          cfg = mcw.write()
> @@ -562,6 +566,7 @@ class FilterWindow(InstallWindow):
>                                     gobject.TYPE_STRING)
>          self.store.set_sort_column_id(MODEL_COL, gtk.SORT_ASCENDING)
>  
> +        anaconda.id.storage.devicetree.teardownAll()
>          udev_trigger(subsystem="block")
>          # So that drives onlined by these show up in the filter UI
>          storage.iscsi.iscsi().startup(anaconda.intf)
> @@ -570,7 +575,11 @@ class FilterWindow(InstallWindow):
>          storage.dasd.DASD().startup(anaconda.intf,
>                                      anaconda.id.storage.exclusiveDisks,
>                                      anaconda.id.storage.zeroMbr)
> -        disks = filter(udev_device_is_disk, udev_get_block_devices())
> +        disks = filter(lambda d: udev_device_is_disk(d) and \
> +                                 not udev_device_is_dm(d) and \
> +                                 not udev_device_is_md(d) and \
> +                                 not udev_device_get_md_container(d),
> +                       udev_get_block_devices())
>  
>          mcw = MultipathConfigWriter()
>          cfg = mcw.write()


I think it would be better to move long lambda's like this into a
function someplace (eg. I used iutil in my recent patch) so that there
is a single point of change/documentation for them.

- -- 
Brian C. Lane <bcl@xxxxxxxxxx>
Red Hat / Port Orchard, WA
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQEVAwUBTEDokxF+jBaO/jp/AQLVBgf+PbhLsZ5BLwuMJVxmul+ZGW+hLOU3t72K
VouN6iyXuHgHl73sH1RQfOvATnOPfh23x64GrrIrkvTVg0vhl1toDx5+ZYKTT/e/
emWM/8cimZdtB8qghFANarcNuPVfYWhxyPrdyISVh7Du4i0E8v5i/j9hDfNNNWGf
mYMaaB0ChP4BSZRsc4b8wtpqN9fdRYi358ct0yT+W6wusl1S8gIrdKP+Pcjh4uR4
aGnADDFAvF37lhdA5Qmd+mixq93mtzeb9vc/4W84Sge+zxkEUrvJazJQ4aqjC0DR
7+FEa5YyIrrroQ7/3I6jfXHEslk38spF+049IYcFc3u9dm5+5GCwDg==
=qD1X
-----END 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