Change in vdsm[master]: network: don't log traceback of missing brif file
phoracek at redhat.com
phoracek at redhat.com
Wed Feb 10 12:23:37 UTC 2016
Petr Horáček has posted comments on this change.
Change subject: network: don't log traceback of missing brif file
......................................................................
Patch Set 2:
(2 comments)
https://gerrit.ovirt.org/#/c/53095/2/lib/vdsm/netinfo/bridges.py
File lib/vdsm/netinfo/bridges.py:
Line 31:
Line 32:
Line 33: def ports(bridge):
Line 34: brif_path = os.path.join('/sys/class/net', bridge, 'brif')
Line 35: if os.path.isfile(brif_path):
> Wouldn't an exception fit here better?
I don't know, i tried both and IMHO this looks better, if you have an exact reason, please tell me.
Line 36: bridge_ports = os.listdir(brif_path)
Line 37: else:
Line 38: # to not leave noise in supervdsm.log, don't log invalid attempts to
Line 39: # obtain bridge's brif file. that could happen when bridge is a part
Line 34: brif_path = os.path.join('/sys/class/net', bridge, 'brif')
Line 35: if os.path.isfile(brif_path):
Line 36: bridge_ports = os.listdir(brif_path)
Line 37: else:
Line 38: # to not leave noise in supervdsm.log, don't log invalid attempts to
> # We expect "bridge" to be a Linux bridge with interfaces.
Done
Line 39: # obtain bridge's brif file. that could happen when bridge is a part
Line 40: # of OVS.
Line 41: logging.warning('Failed to obtain brif file %s' % brif_path)
Line 42: bridge_ports = []
--
To view, visit https://gerrit.ovirt.org/53095
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I0e9feb565b69f097aeb2d2725e2f668cf43fea8b
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček <phoracek at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Edward Haas <edwardh at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Petr Horáček <phoracek at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list