Bug 1057772 - Querying the ipv6 address of a non existing (or no longer existing) device ends up in a Python SystemError
Summary: Querying the ipv6 address of a non existing (or no longer existing) device en...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: python-ethtool
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: David Sommerseth
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1067705 (view as bug list)
Depends On:
Blocks: 1057657
TreeView+ depends on / blocked
 
Reported: 2014-01-24 19:46 UTC by Antoni Segura Puimedon
Modified: 2016-05-22 23:35 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-02-18 11:14:59 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Report invalid/non-existing devices as ENODEV (1.84 KB, text/plain)
2014-02-07 12:59 UTC, David Sommerseth
no flags Details

Description Antoni Segura Puimedon 2014-01-24 19:46:49 UTC
Description of problem:
it is possible to get an etherinfo_obj of a non existing device and when issuing
get_ipv6_address python-ethtool will return NULL to python without setting PyErr, and thus generating a SystemError exception.


Version-Release number of selected component (if applicable):
python-ethtool-0.9-2.fc19.x86_64


How reproducible: 100%


Steps to Reproduce:
1.
import ethtool
dev = ethtool.get_interfaces_info('idontexist')[0]
dev.get_ipv6_addresses()

Actual results:
Python raises a SystemError

Expected results:
ethtool.get_interfaces_info('idontexist') will return an empty list or raise an IOError ENODEV.

Actions on a device that no longer exist (but used to) will raise IOError ENODEV

Additional info:

Comment 1 David Sommerseth 2014-02-07 12:59:08 UTC
Created attachment 860506 [details]
Report invalid/non-existing devices as ENODEV

Proposing this patch to fix this issue.

Comment 2 David Sommerseth 2014-02-21 09:19:33 UTC
*** Bug 1067705 has been marked as a duplicate of this bug. ***

Comment 3 Dan Kenigsberg 2014-02-21 12:45:41 UTC
David, sorry for the duplicate. Is this bug really "MODIFIED"? I do not see the suggested code on the master branch of http://git.fedorahosted.org/cgit/python-ethtool.git/ .

Do you have an ETA for a Fedora build with this? At the moment it is quite detrimental to oVirt-3.4.0 on Fedora.

Comment 4 David Sommerseth 2014-02-21 15:17:10 UTC
I got this patch reviewed first, as Antoni had already been improving similar code paths earlier.

Pushed out to the public git masters:

commit 3463fc5556f731aa2e29981bdb27cb50364770dd
Author: David Sommerseth <davids>
Date:   Fri Feb 7 13:53:36 2014 +0100

    Report invalid/non-existing devices as ENODEV
    
    Without this patch py-ethtool will just report with a very
    generic system error exception if trying to query a non-existing
    network interface.  This patch will change this to report the
    error using ENODEV instead.
    
    Signed-off-by: David Sommerseth <davids>
    Reviewed-by: Antoni S. Puimedon <asegurap>

This is the same patch as attached to this bz.

I'll try to spin a new Fedora package during next week.

Comment 5 Dan Kenigsberg 2014-02-21 22:37:08 UTC
Oh, I did not know that you've "forked" http://fedorapeople.org/cgit/dsommers/public_git/python-ethtool.git/ . Thanks for handling this.

Comment 7 Fedora End Of Life 2015-01-09 22:36:55 UTC
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 8 Fedora End Of Life 2015-02-18 11:14:59 UTC
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.