Change in vdsm[master]: ethtool_opts: provide a way to apply to all slaves

danken at redhat.com danken at redhat.com
Mon Sep 8 13:43:43 UTC 2014


Dan Kenigsberg has posted comments on this change.

Change subject: ethtool_opts: provide a way to apply to all slaves
......................................................................


Patch Set 2: Code-Review-1

(5 comments)

http://gerrit.ovirt.org/#/c/32508/2/vdsm_hooks/ethtool_options/README
File vdsm_hooks/ethtool_options/README:

Line 22: b) Apply to all the bond slaves:
Line 23:     '--coalesce * rx-usecs 14 sample_interval 3'
Line 24:    This would execute an ethtool process for each slave.
Line 25: 
Line 26: NOTE: It is a hidden lazy admin feature that if one uses vdsm_bond_slaves with
Why hide it? Just because we did not think of it to begin with? Let's document it! It's smarter and easier for most cases.

Note that "vdsm_bond_slaves" is outdated.


http://gerrit.ovirt.org/#/c/32508/2/vdsm_hooks/ethtool_options/ethtool_options.py
File vdsm_hooks/ethtool_options/ethtool_options.py:

Line 31:     '/sbin/ethtool',  # EL6, ubuntu and Debian
Line 32:     '/usr/bin/ethtool',  # Arch
Line 33: )
Line 34: 
Line 35: ALL_SLAVES = '*'  # Too long to be a device name, so we're safe
comment is out of date, we need a new excuse.
Line 36: 
Line 37: Subcommand = namedtuple('Subcommand', ('name', 'device', 'flags'))
Line 38: 
Line 39: 


Line 42:                  'custom': ethtool_opts,
Line 43:                  'bootproto': 'dhcp', 'STP': 'no', 'bridged': 'true'}
Line 44: 
Line 45:     _validate_dev_ownership(
Line 46:         nics, 'test_net',
unrelated whitespace changes; preferably done sometime else.
Line 47:         (item for item in _parse_into_subcommands(
Line 48:             net_attrs['custom']['ethtool_opts'].split(' ')) if item))
Line 49: 
Line 50: 


Line 49: 
Line 50: 
Line 51: def test():
Line 52:     opts = {'ethtool_opts':
Line 53:             '--coalesce em1 rx-usecs 14 sample_interval 3 '
evil underscore is still in sample_interval.
Line 54:             '--offload em2 rx on lro on tso off '
Line 55:             '--change em1 speed 1000 duplex half'}
Line 56:     # Test subcmd split
Line 57:     print(opts['ethtool_opts'])


Line 108:                         _set_ethtool_opts(network, [subcmd.name, nic] +
Line 109:                                           subcmd.flags)
Line 110:             else:
Line 111:                 raise RuntimeError(
Line 112:                     'Trying to apply ethtool opts for mixing all slaves '
Come to think of this - why is that an issue? Why not allow '*' for one subcommand, and a specific nic for another?
Line 113:                     'expression and specific slaves is not valid')
Line 114:         else:  # No bonding or specific slaves case
Line 115:             _validate_dev_ownership(_net_nics(attrs), network, subcommands)
Line 116:             for subcmd in subcommands:


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Idddbc167be4ac8ba7c4b4ab10da0275b4caf2a58
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list