Antoni Segura Puimedon has uploaded a new change for review.
Change subject: ethtool_opts: Add hook for applying network custom property ......................................................................
ethtool_opts: Add hook for applying network custom property
ethtool_options is a hook that takes as input a network 'custom' property named 'ethtool_opts' that has as its content the arguments for the ethtool command line utility.
This hook detects whether those arguments are valid in the sense of applying to nics that belong to the network hierarchy for which the custom property has been set.
As an example of the expected content: '--offload em2 rx on --offload em1 tx on' which would apply for a bond that is set over em1 and em2.
Change-Id: I41d89e00002e2b011bc1dc2825276d14bc99f577 Signed-off-by: Antoni S. Puimedon asegurap@redhat.com --- M configure.ac M debian/Makefile.am M debian/control A debian/vdsm-hook-ethtool-options.docs A debian/vdsm-hook-ethtool-options.install M vdsm.spec.in M vdsm_hooks/Makefile.am A vdsm_hooks/ethtool_options/Makefile.am A vdsm_hooks/ethtool_options/README A vdsm_hooks/ethtool_options/ethtool_options.py 10 files changed, 217 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/94/26694/1
diff --git a/configure.ac b/configure.ac index 7a9b187..8d7f42e 100644 --- a/configure.ac +++ b/configure.ac @@ -283,6 +283,7 @@ vdsm_hooks/bridge_options/Makefile vdsm_hooks/checkimages/Makefile vdsm_hooks/directlun/Makefile + vdsm_hooks/ethtool_options/Makefile vdsm_hooks/extnet/Makefile vdsm_hooks/faqemu/Makefile vdsm_hooks/fileinject/Makefile diff --git a/debian/Makefile.am b/debian/Makefile.am index a65a5d6..348bf21 100644 --- a/debian/Makefile.am +++ b/debian/Makefile.am @@ -41,6 +41,8 @@ vdsm-hook-checkimages.install \ vdsm-hook-directlun.docs \ vdsm-hook-directlun.install \ + vdsm-hook-ethtool-options.docs \ + vdsm-hook-ethtool-options.install \ vdsm-hook-extnet.docs \ vdsm-hook-extnet.install \ vdsm-hook-faqemu.docs \ diff --git a/debian/control b/debian/control index cdc380a..62ed619 100644 --- a/debian/control +++ b/debian/control @@ -161,6 +161,12 @@ VDSM hook used to perform consistency check on a qcow2 format disk image using the QEMU disk image utility.
+Package: vdsm-hook-ethtool-options +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends}, python (>=2.7.3), vdsm (>= ${source:Version}) +Description: VDSM hook used for applying custom network properties that define + ethtool options for vdsm network nics + Package: vdsm-hook-vhostmd Architecture: all Depends: ${shlibs:Depends}, ${misc:Depends}, python (>=2.7.3), vdsm (>= ${source:Version}) diff --git a/debian/vdsm-hook-ethtool-options.docs b/debian/vdsm-hook-ethtool-options.docs new file mode 100644 index 0000000..5ecd9c6 --- /dev/null +++ b/debian/vdsm-hook-ethtool-options.docs @@ -0,0 +1 @@ +COPYING diff --git a/debian/vdsm-hook-ethtool-options.install b/debian/vdsm-hook-ethtool-options.install new file mode 100644 index 0000000..4f93300 --- /dev/null +++ b/debian/vdsm-hook-ethtool-options.install @@ -0,0 +1 @@ +usr/libexec/vdsm/hooks/after_network_setup/30_ethtool_options diff --git a/vdsm.spec.in b/vdsm.spec.in index bffce1b..390e4a1 100644 --- a/vdsm.spec.in +++ b/vdsm.spec.in @@ -393,6 +393,15 @@ VDSM hook used for applying custom network properties that define bridge options for vdsm network bridges
+%package hook-ethtool-options +Summary: Allow setting custom ethtool options for vdsm controlled nics +BuildArch: noarch +Requires: %{name} = %{version}-%{release} + +%description hook-ethtool-options +VDSM hook used for applying custom network properties that define ethtool +options for vdsm network nics + %if 0%{?with_vhostmd} %package hook-vhostmd Summary: VDSM hook set for interaction with vhostmd @@ -1248,6 +1257,10 @@ %defattr(-, root, root, -) %{_libexecdir}/%{vdsm_name}/hooks/after_network_setup/20_bridge_options
+%files hook-ethtool-options +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/after_network_setup/30_ethtool_options + %if 0%{?with_hooks} %files hook-checkimages %defattr(-, root, root, -) diff --git a/vdsm_hooks/Makefile.am b/vdsm_hooks/Makefile.am index f046eaf..c911633 100644 --- a/vdsm_hooks/Makefile.am +++ b/vdsm_hooks/Makefile.am @@ -1,5 +1,5 @@ # -# Copyright 2008-2011 Red Hat, Inc. +# Copyright 2008-2014 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -18,7 +18,8 @@ # Refer to the README and COPYING files for full details of the license #
-SUBDIRS = bridge_options faqemu vhostmd qemucmdline openstacknet +SUBDIRS = bridge_options ethtool_options faqemu vhostmd qemucmdline \ + openstacknet
include $(top_srcdir)/build-aux/Makefile.subs
diff --git a/vdsm_hooks/ethtool_options/Makefile.am b/vdsm_hooks/ethtool_options/Makefile.am new file mode 100644 index 0000000..f23eebf --- /dev/null +++ b/vdsm_hooks/ethtool_options/Makefile.am @@ -0,0 +1,30 @@ +# +# Copyright 2014 Red Hat, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# +# Refer to the README and COPYING files for full details of the license +# + +EXTRA_DIST = \ + ethtool_options.py + +install-data-local: + $(MKDIR_P) $(DESTDIR)$(vdsmhooksdir)/after_network_setup + $(INSTALL_SCRIPT) $(srcdir)/ethtool_options.py \ + $(DESTDIR)$(vdsmhooksdir)/after_network_setup/30_ethtool_options + +uninstall-local: + $(RM) $(DESTDIR)$(vdsmhooksdir)/after_network_setup/30_ethtool_options diff --git a/vdsm_hooks/ethtool_options/README b/vdsm_hooks/ethtool_options/README new file mode 100644 index 0000000..d6d6a0e --- /dev/null +++ b/vdsm_hooks/ethtool_options/README @@ -0,0 +1,15 @@ +ethtool_options vdsm hook +================================= +This hook allows the user to set ethtool options for networks that are set +over network interface cards (directly or indirectly). + +Requirements: +* oVirt-3.5 + +Usage: +In the oVirt UI edit custom network properties and, for the key 'ethtool_opts' +set the command line parameters that one would pass to the ethtool command +line application. E.g.: + '--coalesce ethX rx-usecs 14 sample_interval 3 --offload ethX rx on lroon tcp-segmentation-offload off --change ethX speed 1000 duplex half' +If it is for a bond with em1 and em2, it could look like: + '--offload em2 rx on --offload em1 tx on' diff --git a/vdsm_hooks/ethtool_options/ethtool_options.py b/vdsm_hooks/ethtool_options/ethtool_options.py new file mode 100644 index 0000000..51966ef --- /dev/null +++ b/vdsm_hooks/ethtool_options/ethtool_options.py @@ -0,0 +1,145 @@ +#!/usr/bin/env python +# Copyright 2014 Red Hat, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# +# Refer to the README and COPYING files for full details of the license +# +from collections import namedtuple +import json +import os +import sys +import hooking +import traceback + +from vdsm import netinfo +from vdsm.utils import CommandPath + +ETHTOOL_BINARY = CommandPath( + 'ethtool', + '/usr/sbin/ethtool', # F19+ + '/sbin/ethtool', # EL6, ubuntu and Debian + '/usr/bin/ethtool', # Arch +) + +Subcommand = namedtuple('Subcommand', ('name', 'device', 'flags')) + + +def _test_cmd_with_nics(nics, ethtool_opts): + net_attrs = {'bonding': 'james', + 'custom': ethtool_opts, + 'bootproto': 'dhcp', 'STP': 'no', 'bridged': 'true'} + + _validate_dev_ownership(nics, 'test_net', + net_attrs['custom']['ethtool_opts'].split(' ')) + + +def test(): + opts = {'ethtool_opts': + '--coalesce em1 rx-usecs 14 sample_interval 3 ' + '--offload em2 rx on lroon tcp-segmentation-offload off ' + '--change em1 speed 1000 duplex half'} + # Test with the correct nics + nics = ('em1', 'em2') + try: + _test_cmd_with_nics(nics, opts) + except Exception: + raise + else: + print('ethtool options hook: Correctly accepted input %s for fake ' + 'nics %s' % (opts['ethtool_opts'], nics)) + # Test with a subset of the nics + nics = ('em1',) + try: + _test_cmd_with_nics(nics, opts) + except Exception: + print('ethtool options hook: Correctly rejected input %s for fake ' + 'nics %s' % (opts['ethtool_opts'], nics)) + else: + raise ValueError('ethtool options hook: Incorrectly accepted input %s ' + 'for fake nics %s' % (opts['ethtool_opts'], nics)) + + +def main(): + """Read bridge_options from the network 'custom' properties and apply them + to the network's bridge.""" + with open(os.environ['_hook_json']) as data_file: + setup_nets_config = json.load(data_file) + + for network, attrs in setup_nets_config['request']['networks'].items(): + if 'remove' in attrs: + continue + elif 'custom' in attrs: + _process_network(network, attrs) + + +def _process_network(network, attrs): + """Applies ethtool_options to the network if necessary""" + options = attrs['custom'].get('ethtool_opts') + if options is not None: + tokens = options.split(' ') + _validate_dev_ownership(_net_nics(), network, tokens) + _set_ethtool_opts(network, tokens) + + +def _net_nics(attrs): + if 'bonding' in attrs: + return netinfo.slaves(attrs['bonding']) + else: + return [attrs.pop('nic')] if 'nic' in attrs else () + + +def _validate_dev_ownership(nics, name, tokens): + """Generator that takes ethtool cmdline arguments and yields Subcommands if + all of them are valid""" + if not nics: + raise RuntimeError('Network %s has no nics.' % name) + + for cmd in _parse_into_subcommands(tokens): + if cmd.device not in nics: + raise RuntimeError('Trying to apply ethtool opts for dev: %s, not ' + 'in the net nics: %s' % (cmd.device, nics)) + + +def _parse_into_subcommands(tokens): + current = [] + for token in tokens: + if token.startswith('-') and current: + yield Subcommand(current[0], current[1], current[1:]) + current = [] + current.append(token) + if current: + yield Subcommand(current[0], current[1], ' '.join(current[1:])) + + +def _set_ethtool_opts(network, options): + """Takes an iterable of the tokenized ethtool command line arguments and + applies them to the bridge""" + command = [ETHTOOL_BINARY.cmd] + options + rc, _, err = hooking.execCmd(command, sudo=True) + if rc != 0: + raise RuntimeError('Failed to set ethtool opts (%s) for network %s' % + (' '.join(options), network)) + + +if __name__ == '__main__': + try: + if '--test' in sys.argv: + test() + else: + main() + except: + hooking.exit_hook('ethtool_options hook: [unexpected error]: %s\n' % + traceback.format_exc())
oVirt Jenkins CI Server has posted comments on this change.
Change subject: ethtool_opts: Add hook for applying network custom property ......................................................................
Patch Set 1:
Build Successful
http://jenkins.ovirt.org/job/vdsm_master_install_rpm_sanity_gerrit/477/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/7985/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit/8098/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/7195/ : SUCCESS
Dan Kenigsberg has posted comments on this change.
Change subject: ethtool_opts: Add hook for applying network custom property ......................................................................
Patch Set 1: Code-Review-1
(8 comments)
Partial review. I am mostly worried about the need to specify the net's nic, and to update them manually if they change. Not that I have a better idea.
http://gerrit.ovirt.org/#/c/26694/1/vdsm_hooks/ethtool_options/ethtool_optio... File vdsm_hooks/ethtool_options/ethtool_options.py:
Line 42: 'custom': ethtool_opts, Line 43: 'bootproto': 'dhcp', 'STP': 'no', 'bridged': 'true'} Line 44: Line 45: _validate_dev_ownership(nics, 'test_net', Line 46: net_attrs['custom']['ethtool_opts'].split(' ')) please treat multiple spaces as a single whitespace - it's hard to be strict about this on the Engine side. Line 47: Line 48: Line 49: def test(): Line 50: opts = {'ethtool_opts':
Line 63: # Test with a subset of the nics Line 64: nics = ('em1',) Line 65: try: Line 66: _test_cmd_with_nics(nics, opts) Line 67: except Exception: it's only a test, but please catch a more precise exception. Current test considers a SyntaxError in _parse_into_subcommands() as success. Line 68: print('ethtool options hook: Correctly rejected input %s for fake ' Line 69: 'nics %s' % (opts['ethtool_opts'], nics)) Line 70: else: Line 71: raise ValueError('ethtool options hook: Incorrectly accepted input %s '
Line 72: 'for fake nics %s' % (opts['ethtool_opts'], nics)) Line 73: Line 74: Line 75: def main(): Line 76: """Read bridge_options from the network 'custom' properties and apply them stale copy-paste Line 77: to the network's bridge.""" Line 78: with open(os.environ['_hook_json']) as data_file: Line 79: setup_nets_config = json.load(data_file) Line 80:
Line 74: Line 75: def main(): Line 76: """Read bridge_options from the network 'custom' properties and apply them Line 77: to the network's bridge.""" Line 78: with open(os.environ['_hook_json']) as data_file: use the recent hooking.read_json() Line 79: setup_nets_config = json.load(data_file) Line 80: Line 81: for network, attrs in setup_nets_config['request']['networks'].items(): Line 82: if 'remove' in attrs:
Line 89: """Applies ethtool_options to the network if necessary""" Line 90: options = attrs['custom'].get('ethtool_opts') Line 91: if options is not None: Line 92: tokens = options.split(' ') Line 93: _validate_dev_ownership(_net_nics(), network, tokens) no args to _net_nics()?? Line 94: _set_ethtool_opts(network, tokens) Line 95: Line 96: Line 97: def _net_nics(attrs):
Line 101: return [attrs.pop('nic')] if 'nic' in attrs else () Line 102: Line 103: Line 104: def _validate_dev_ownership(nics, name, tokens): Line 105: """Generator that takes ethtool cmdline arguments and yields Subcommands if mismatching docstring. This function yields nothing. Line 106: all of them are valid""" Line 107: if not nics: Line 108: raise RuntimeError('Network %s has no nics.' % name) Line 109:
Line 125: Line 126: Line 127: def _set_ethtool_opts(network, options): Line 128: """Takes an iterable of the tokenized ethtool command line arguments and Line 129: applies them to the bridge""" bridge->nic I suppose Line 130: command = [ETHTOOL_BINARY.cmd] + options Line 131: rc, _, err = hooking.execCmd(command, sudo=True) Line 132: if rc != 0: Line 133: raise RuntimeError('Failed to set ethtool opts (%s) for network %s' %
Line 127: def _set_ethtool_opts(network, options): Line 128: """Takes an iterable of the tokenized ethtool command line arguments and Line 129: applies them to the bridge""" Line 130: command = [ETHTOOL_BINARY.cmd] + options Line 131: rc, _, err = hooking.execCmd(command, sudo=True) Please add ETHTOOL_BINARY to a hook-specific sudoers.d drop-in. Line 132: if rc != 0: Line 133: raise RuntimeError('Failed to set ethtool opts (%s) for network %s' % Line 134: (' '.join(options), network)) Line 135:
Antoni Segura Puimedon has posted comments on this change.
Change subject: ethtool_opts: Add hook for applying network custom property ......................................................................
Patch Set 1:
(8 comments)
http://gerrit.ovirt.org/#/c/26694/1/vdsm_hooks/ethtool_options/ethtool_optio... File vdsm_hooks/ethtool_options/ethtool_options.py:
Line 42: 'custom': ethtool_opts, Line 43: 'bootproto': 'dhcp', 'STP': 'no', 'bridged': 'true'} Line 44: Line 45: _validate_dev_ownership(nics, 'test_net', Line 46: net_attrs['custom']['ethtool_opts'].split(' '))
please treat multiple spaces as a single whitespace - it's hard to be stric
Done Line 47: Line 48: Line 49: def test(): Line 50: opts = {'ethtool_opts':
Line 63: # Test with a subset of the nics Line 64: nics = ('em1',) Line 65: try: Line 66: _test_cmd_with_nics(nics, opts) Line 67: except Exception:
it's only a test, but please catch a more precise exception. Current test c
Done Line 68: print('ethtool options hook: Correctly rejected input %s for fake ' Line 69: 'nics %s' % (opts['ethtool_opts'], nics)) Line 70: else: Line 71: raise ValueError('ethtool options hook: Incorrectly accepted input %s '
Line 72: 'for fake nics %s' % (opts['ethtool_opts'], nics)) Line 73: Line 74: Line 75: def main(): Line 76: """Read bridge_options from the network 'custom' properties and apply them
stale copy-paste
Done Line 77: to the network's bridge.""" Line 78: with open(os.environ['_hook_json']) as data_file: Line 79: setup_nets_config = json.load(data_file) Line 80:
Line 74: Line 75: def main(): Line 76: """Read bridge_options from the network 'custom' properties and apply them Line 77: to the network's bridge.""" Line 78: with open(os.environ['_hook_json']) as data_file:
use the recent hooking.read_json()
Done Line 79: setup_nets_config = json.load(data_file) Line 80: Line 81: for network, attrs in setup_nets_config['request']['networks'].items(): Line 82: if 'remove' in attrs:
Line 89: """Applies ethtool_options to the network if necessary""" Line 90: options = attrs['custom'].get('ethtool_opts') Line 91: if options is not None: Line 92: tokens = options.split(' ') Line 93: _validate_dev_ownership(_net_nics(), network, tokens)
no args to _net_nics()??
Done Line 94: _set_ethtool_opts(network, tokens) Line 95: Line 96: Line 97: def _net_nics(attrs):
Line 101: return [attrs.pop('nic')] if 'nic' in attrs else () Line 102: Line 103: Line 104: def _validate_dev_ownership(nics, name, tokens): Line 105: """Generator that takes ethtool cmdline arguments and yields Subcommands if
mismatching docstring. This function yields nothing.
Done Line 106: all of them are valid""" Line 107: if not nics: Line 108: raise RuntimeError('Network %s has no nics.' % name) Line 109:
Line 125: Line 126: Line 127: def _set_ethtool_opts(network, options): Line 128: """Takes an iterable of the tokenized ethtool command line arguments and Line 129: applies them to the bridge"""
bridge->nic I suppose
Done Line 130: command = [ETHTOOL_BINARY.cmd] + options Line 131: rc, _, err = hooking.execCmd(command, sudo=True) Line 132: if rc != 0: Line 133: raise RuntimeError('Failed to set ethtool opts (%s) for network %s' %
Line 127: def _set_ethtool_opts(network, options): Line 128: """Takes an iterable of the tokenized ethtool command line arguments and Line 129: applies them to the bridge""" Line 130: command = [ETHTOOL_BINARY.cmd] + options Line 131: rc, _, err = hooking.execCmd(command, sudo=True)
Please add ETHTOOL_BINARY to a hook-specific sudoers.d drop-in.
Done Line 132: if rc != 0: Line 133: raise RuntimeError('Failed to set ethtool opts (%s) for network %s' % Line 134: (' '.join(options), network)) Line 135:
oVirt Jenkins CI Server has posted comments on this change.
Change subject: ethtool_opts: Add hook for applying network custom property ......................................................................
Patch Set 2:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_install_rpm_sanity_gerrit/502/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/8236/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit/8349/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/7446/ : SUCCESS
Antoni Segura Puimedon has posted comments on this change.
Change subject: ethtool_opts: Add hook for applying network custom property ......................................................................
Patch Set 3: Verified+1
oVirt Jenkins CI Server has posted comments on this change.
Change subject: ethtool_opts: Add hook for applying network custom property ......................................................................
Patch Set 3:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_install_rpm_sanity_gerrit/505/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/8254/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit/8367/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/7464/ : FAILURE
Antoni Segura Puimedon has posted comments on this change.
Change subject: ethtool_opts: Add hook for applying network custom property ......................................................................
Patch Set 3:
I improved the output of the testing and fixed one of the test features name (tso).
The verification process consisted on:
toniel602 ~ # ethtool --show-offload eth2 Features for eth2: rx-checksumming: on tx-checksumming: on scatter-gather: on tcp-segmentation-offload: on udp-fragmentation-offload: on generic-segmentation-offload: on generic-receive-offload: off large-receive-offload: off ntuple-filters: off receive-hashing: off
On a python terminal: from vdsm import vdscli
c = vdscli.connect()
# Changing tcp-segmentation-offload for eht2 c.setupNetworks({'ethopt': {'nic': 'eth2', 'custom': {'ethtool_opts': '--offload eth2 tso off'}} }, {}, {'connectivityCheck': False})
back to bash: toniel602 ~ # ethtool --show-offload eth2 Features for eth2: rx-checksumming: on tx-checksumming: on scatter-gather: on tcp-segmentation-offload: off udp-fragmentation-offload: on generic-segmentation-offload: on generic-receive-offload: off large-receive-offload: off ntuple-filters: off receive-hashing: off toniel602 ~ #
Antoni Segura Puimedon has posted comments on this change.
Change subject: ethtool_opts: Add hook for applying network custom property ......................................................................
Patch Set 4: Verified+1
Copying score as only the README has changed to fix the wrong name for tcp-segmentation-offset cmdline option.
oVirt Jenkins CI Server has posted comments on this change.
Change subject: ethtool_opts: Add hook for applying network custom property ......................................................................
Patch Set 4:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_install_rpm_sanity_gerrit/506/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/8255/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit/8368/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/7465/ : SUCCESS
Antoni Segura Puimedon has posted comments on this change.
Change subject: ethtool_opts: Add hook for applying network custom property ......................................................................
Patch Set 4:
Note that with this change vdsm-hook-ethool-options will be built as part of the ususal make rpm build, not requiring WITH_HOOKS to be set.
Dan Kenigsberg has posted comments on this change.
Change subject: ethtool_opts: Add hook for applying network custom property ......................................................................
Patch Set 4: Code-Review+2
Dan Kenigsberg has submitted this change and it was merged.
Change subject: ethtool_opts: Add hook for applying network custom property ......................................................................
ethtool_opts: Add hook for applying network custom property
ethtool_options is a hook that takes as input a network 'custom' property named 'ethtool_opts' that has as its content the arguments for the ethtool command line utility.
This hook detects whether those arguments are valid in the sense of applying to nics that belong to the network hierarchy for which the custom property has been set.
As an example of the expected content: '--offload em2 rx on --offload em1 tx on' which would apply for a bond that is set over em1 and em2.
Change-Id: I41d89e00002e2b011bc1dc2825276d14bc99f577 Signed-off-by: Antoni S. Puimedon asegurap@redhat.com Reviewed-on: http://gerrit.ovirt.org/26694 Reviewed-by: Dan Kenigsberg danken@redhat.com --- M configure.ac M debian/Makefile.am M debian/control A debian/vdsm-hook-ethtool-options.docs A debian/vdsm-hook-ethtool-options.install M vdsm.spec.in M vdsm_hooks/Makefile.am A vdsm_hooks/ethtool_options/Makefile.am A vdsm_hooks/ethtool_options/README A vdsm_hooks/ethtool_options/ethtool_options.py A vdsm_hooks/ethtool_options/sudoers 11 files changed, 223 insertions(+), 2 deletions(-)
Approvals: Antoni Segura Puimedon: Verified Dan Kenigsberg: Looks good to me, approved
oVirt Jenkins CI Server has posted comments on this change.
Change subject: ethtool_opts: Add hook for applying network custom property ......................................................................
Patch Set 5:
Build Successful
http://jenkins.ovirt.org/job/vdsm_master_install_rpm_sanity_gerrit/538/ : SUCCESS
vdsm-patches@lists.fedorahosted.org