Change in vdsm[ovirt-3.4]: netinfo: do not report broken networks

danken at redhat.com danken at redhat.com
Fri Sep 26 22:01:58 UTC 2014


Dan Kenigsberg has submitted this change and it was merged.

Change subject: netinfo: do not report broken networks
......................................................................


netinfo: do not report broken networks

Function _getNetInfo() called from netinfo.py:get() raises IOError in
case when we try to get information about broken network (network with
non-existing interface).

This problem happens with ovirt-3.4, Fedora 20, python-ethtool 0.11

Problem is in _getNetInfo(), where we catch only errno.ENOENT.
- This is OK in ovirt-3.5 and master branch.
- In older branches (where we USE ETHTOOL in getIpInfo()), if defined
device is not found by getIpInfo(), errno.ENODEV is raised.
-> Due to this difference in error codes, parent function get() does not
get KeyError from getIpInfo() exception and therefore it does report
broken device.

Now _getNetInfo() catch errno.ENODEV too.

Change-Id: I1fa9173cb65d5140951c38d0cf1e49eb93222903
Signed-off-by: Petr Horáček <phoracek at redhat.com>
Label: ovirt-3.4-only
Bug-Url: https://bugzilla.redhat.com/1146960
Reviewed-on: http://gerrit.ovirt.org/33320
Reviewed-by: Dan Kenigsberg <danken at redhat.com>
---
M lib/vdsm/netinfo.py
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Petr Horáček: Verified
  Dan Kenigsberg: Looks good to me, approved



-- 
To view, visit http://gerrit.ovirt.org/33320
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I1fa9173cb65d5140951c38d0cf1e49eb93222903
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.4
Gerrit-Owner: Petr Horáček <phoracek at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Petr Horáček <phoracek at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: automation at ovirt.org


More information about the vdsm-patches mailing list