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

danken at redhat.com danken at redhat.com
Wed Sep 24 11:28:54 UTC 2014


Dan Kenigsberg has posted comments on this change.

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


Patch Set 1: Code-Review-1

(2 comments)

http://gerrit.ovirt.org/#/c/33320/1//COMMIT_MSG
Commit Message:

Line 9: Function _getNetInfo() called from netinfo.py:get() raises IOError in
Line 10: case when we try to get information about broken network (network with
Line 11: non-existing interface).
Line 12: 
Line 13: In master branch we handle get() function differently, thanks to it
Could you explain this issue a bit more? I do not understand why this does not apply to master branch; or why testBrokenBridgelessNetReplacement does not catch this issue. Could you fix testBrokenBridgelessNetReplacement so that it fails with the existing code, but passes with your new one?

If this is indeed ovirt-3.4-only patch, please use

 Label: ovirt-3.4-only

to specify that
Line 14: this error does not happen there.
Line 15: 
Line 16: I changed get() function to ignore IOError and not report that broken
Line 17: network.


http://gerrit.ovirt.org/#/c/33320/1/lib/vdsm/netinfo.py
File lib/vdsm/netinfo.py:

Line 493:                      'mtu': str(getMtu(iface))})
Line 494:         if qosInbound:
Line 495:             data['qosInbound'] = qosInbound
Line 496:         if qosOutbound:
Line 497:             data['qosOutbound'] = qosOutbound
which errno is raised in your condition (I suspect ENODEV)? I thought that the exception should be caught and ignored here.
Line 498:     except (IOError, OSError) as e:
Line 499:         if e.errno == errno.ENOENT:
Line 500:             logging.info('Obtaining info for net %s.', iface, exc_info=True)
Line 501:             raise KeyError('Network %s was not found' % iface)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I1fa9173cb65d5140951c38d0cf1e49eb93222903
Gerrit-PatchSet: 1
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: automation at ovirt.org
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list