I incorrectly assumed that udev_get_device_md_uuid was tolerant to the "MD_UUID" key not being present, which meant a traceback for anything other than imsm member disks upon entering the filter gui.
Resolves: rhbz#1320545 Related: rhbz#1269872 --- iw/filter_gui.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/iw/filter_gui.py b/iw/filter_gui.py index 8512248..ff0cd8f 100644 --- a/iw/filter_gui.py +++ b/iw/filter_gui.py @@ -762,8 +762,11 @@ class FilterWindow(InstallWindow): # from here or the basic storage path. Since isRAID really # identifies raid _members_ the arrays end up in nonraids, which is # wrong. - if udev_device_get_md_uuid(d): - continue + try: + if udev_device_get_md_uuid(d): + continue + except KeyError: + pass
name = udev_device_get_name(d)
On Wed, 2016-03-23 at 09:30 -0400, David Lehman wrote:
Resolves: rhbz#1320545 Related: rhbz#1269872
iw/filter_gui.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/iw/filter_gui.py b/iw/filter_gui.py index 8512248..ff0cd8f 100644 --- a/iw/filter_gui.py +++ b/iw/filter_gui.py @@ -762,8 +762,11 @@ class FilterWindow(InstallWindow): # from here or the basic storage path. Since isRAID really # identifies raid _members_ the arrays end up in nonraids, which is # wrong. - if udev_device_get_md_uuid(d): - continue + try: + if udev_device_get_md_uuid(d): + continue + except KeyError: + pass name = udev_device_get_name(d)
It would be nice to have log instead of pass. I think debug or info should be fine.
On Thu, 2016-03-24 at 10:25 +0100, Jiří Konečný wrote:
On Wed, 2016-03-23 at 09:30 -0400, David Lehman wrote:
Resolves: rhbz#1320545 Related: rhbz#1269872
iw/filter_gui.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/iw/filter_gui.py b/iw/filter_gui.py index 8512248..ff0cd8f 100644 --- a/iw/filter_gui.py +++ b/iw/filter_gui.py @@ -762,8 +762,11 @@ class FilterWindow(InstallWindow): # from here or the basic storage path. Since isRAID really # identifies raid _members_ the arrays end up in nonraids, which is # wrong. - if udev_device_get_md_uuid(d): - continue + try: + if udev_device_get_md_uuid(d): + continue + except KeyError: + pass name = udev_device_get_name(d)
It would be nice to have log instead of pass. I think debug or info should be fine.
This code will run for all disks. That means normal disks, members of fwraid arrays, and member of multipath sets. The only case where the above code is relevant is one vendor's fwraid (Intel's imsm/isw). So it is expected that this exception will be raised (and caught) more often than not. Given that, I did not think it made sense to log the exception. Do you still think it should be logged? If so, why?
David
anaconda-patches mailing list anaconda-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/anaconda-patches@lists.fed orahosted.org
On Thu, 2016-03-24 at 14:07 -0400, David Lehman wrote:
On Thu, 2016-03-24 at 10:25 +0100, Jiří Konečný wrote:
On Wed, 2016-03-23 at 09:30 -0400, David Lehman wrote:
Resolves: rhbz#1320545 Related: rhbz#1269872
iw/filter_gui.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/iw/filter_gui.py b/iw/filter_gui.py index 8512248..ff0cd8f 100644 --- a/iw/filter_gui.py +++ b/iw/filter_gui.py @@ -762,8 +762,11 @@ class FilterWindow(InstallWindow): # from here or the basic storage path. Since isRAID really # identifies raid _members_ the arrays end up in nonraids, which is # wrong. - if udev_device_get_md_uuid(d): - continue + try: + if udev_device_get_md_uuid(d): + continue + except KeyError: + pass name = udev_device_get_name(d)
It would be nice to have log instead of pass. I think debug or info should be fine.
This code will run for all disks. That means normal disks, members of fwraid arrays, and member of multipath sets. The only case where the above code is relevant is one vendor's fwraid (Intel's imsm/isw). So it is expected that this exception will be raised (and caught) more often than not. Given that, I did not think it made sense to log the exception. Do you still think it should be logged? If so, why?
David
If this exception will be caught so often, can we use some kind of if statement instead of exception handling? However if that would be too hard to implement then you have my ACK for this one.
Jirka
anaconda-patches mailing list anaconda-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/anaconda-patches@lists.f ed orahosted.org
anaconda-patches mailing list anaconda-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/anaconda-patches@lists.fed orahosted.org
anaconda-patches@lists.fedorahosted.org