Change in vdsm[master]: network: don't log missing brif files

danken at redhat.com danken at redhat.com
Mon Feb 8 12:16:29 UTC 2016


Dan Kenigsberg has posted comments on this change.

Change subject: network: don't log missing brif files
......................................................................


Patch Set 2: Code-Review-1

(2 comments)

https://gerrit.ovirt.org/#/c/53095/2/lib/vdsm/netinfo/bridges.py
File lib/vdsm/netinfo/bridges.py:

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.
# It is quite common the this is not the case, when the bridge is actually implemented by OVS (via our hook) or when the Linux bridge device is not yet up.
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 = []


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 40:         # of OVS.
Line 41:         logging.warning('Failed to obtain brif file %s' % brif_path)
> I don't see why this is better than a trace, both do not describe well the 
I hope this would be more descriptive:

  logging.warning('%s is not a Linux bridge', bridge)
Line 42:         bridge_ports = []
Line 43:     return bridge_ports
Line 44: 
Line 45: 


-- 
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: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list