Change in vdsm[master]: Advertise aggregator ID in bonding interfaces
danken at redhat.com
danken at redhat.com
Thu Feb 4 17:50:56 UTC 2016
Dan Kenigsberg has posted comments on this change.
Change subject: Advertise aggregator ID in bonding interfaces
......................................................................
Patch Set 5:
(5 comments)
https://gerrit.ovirt.org/#/c/53100/5/lib/vdsm/netinfo/bonding.py
File lib/vdsm/netinfo/bonding.py:
Line 68: def info(link):
Line 69: return {'hwaddr': link.address, 'slaves': slaves(link.name),
Line 70: 'active_slave': _active_slave(link.name),
Line 71: 'opts': _getBondingOptions(link.name),
Line 72: 'aggregator_id': nics._get_aggregator_id(link.name) or ''}
does this work for the bonding device itself? is it listed under bonding_slaves?
Line 73:
Line 74:
Line 75: def _active_slave(bond_name):
Line 76: """
https://gerrit.ovirt.org/#/c/53100/5/lib/vdsm/netinfo/nics.py
File lib/vdsm/netinfo/nics.py:
Line 18: # Refer to the README and COPYING files for full details of the license
Line 19: from __future__ import absolute_import
Line 20: import errno
Line 21: import io
Line 22: import os
put in alphabet order, please
Line 23: from functools import partial
Line 24: import logging
Line 25:
Line 26: from ..ipwrapper import drv_name
Line 74: return 0
Line 75:
Line 76:
Line 77: def _get_aggregator_id(nic_name):
Line 78: agg_id_path = '/sys/class/net/{nic}/bonding_slave/ad_aggregator_id'.format(
this string begs to sit with the other BONDING_ constants in bonding.pu (maybe the whole function should go there)?
Line 79: nic=nic_name)
Line 80: if os.path.exists(agg_id_path):
Line 81: try:
Line 82: with open(agg_id_path, "r") as f:
Line 84: except IOError
when can this happen? it is unacceptable to trash the log with exceptions every 15 seconds due to usage of bonding mode!=4.
Line 93: aggregator_id
naming: i'd keep the ad_ prefeix from kernel
also, please do not report an empty string; do not report it if its missing.
--
To view, visit https://gerrit.ovirt.org/53100
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I85267967c9cb1b0a626d91cb1953361ed4de727a
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Sagi Shnaidman <sshnaidm 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: Sagi Shnaidman <sshnaidm at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list