Merge "Support setting ethtool options on network interfaces"

This commit is contained in:
Zuul 2020-08-21 21:07:25 +00:00 committed by Gerrit Code Review
commit a0bdcdb309
4 changed files with 20 additions and 1 deletions
ansible/filter_plugins
doc/source/configuration
releasenotes/notes
requirements.yml

@ -136,6 +136,7 @@ net_rules = _make_attr_filter('rules')
net_physical_network = _make_attr_filter('physical_network')
net_bootproto = _make_attr_filter('bootproto')
net_defroute = _make_attr_filter('defroute')
net_ethtool_opts = _make_attr_filter('ethtool_opts')
@jinja2.contextfilter
@ -212,6 +213,7 @@ def net_interface_obj(context, name, inventory_hostname=None):
rules = net_rules(context, name, inventory_hostname)
bootproto = net_bootproto(context, name, inventory_hostname)
defroute = net_defroute(context, name, inventory_hostname)
ethtool_opts = net_ethtool_opts(context, name, inventory_hostname)
vip_address = net_vip_address(context, name, inventory_hostname)
allowed_addresses = [vip_address] if vip_address else None
interface = {
@ -225,6 +227,7 @@ def net_interface_obj(context, name, inventory_hostname=None):
'rules': rules,
'bootproto': bootproto or 'static',
'defroute': defroute,
'ethtool_opts': ethtool_opts,
'allowed_addresses': allowed_addresses,
'onboot': 'yes',
}
@ -259,6 +262,7 @@ def net_bridge_obj(context, name, inventory_hostname=None):
rules = net_rules(context, name, inventory_hostname)
bootproto = net_bootproto(context, name, inventory_hostname)
defroute = net_defroute(context, name, inventory_hostname)
ethtool_opts = net_ethtool_opts(context, name, inventory_hostname)
vip_address = net_vip_address(context, name, inventory_hostname)
allowed_addresses = [vip_address] if vip_address else None
interface = {
@ -273,6 +277,7 @@ def net_bridge_obj(context, name, inventory_hostname=None):
'rules': rules,
'bootproto': bootproto or 'static',
'defroute': defroute,
'ethtool_opts': ethtool_opts,
'allowed_addresses': allowed_addresses,
'onboot': 'yes',
}
@ -313,6 +318,7 @@ def net_bond_obj(context, name, inventory_hostname=None):
rules = net_rules(context, name, inventory_hostname)
bootproto = net_bootproto(context, name, inventory_hostname)
defroute = net_defroute(context, name, inventory_hostname)
ethtool_opts = net_ethtool_opts(context, name, inventory_hostname)
vip_address = net_vip_address(context, name, inventory_hostname)
allowed_addresses = [vip_address] if vip_address else None
interface = {
@ -333,6 +339,7 @@ def net_bond_obj(context, name, inventory_hostname=None):
'rules': rules,
'bootproto': bootproto or 'static',
'defroute': defroute,
'ethtool_opts': ethtool_opts,
'allowed_addresses': allowed_addresses,
'onboot': 'yes',
}
@ -489,6 +496,7 @@ class FilterModule(object):
'net_physical_network': net_physical_network,
'net_bootproto': net_bootproto,
'net_defroute': net_defroute,
'net_ethtool_opts': net_ethtool_opts,
'net_interface_obj': net_interface_obj,
'net_bridge_obj': net_bridge_obj,
'net_bond_obj': net_bond_obj,

@ -321,6 +321,11 @@ The following attributes are supported:
For bond interfaces, the xmit_hash_policy to use for the bond.
``bond_lacp_rate``
For bond interfaces, the lacp_rate to use for the bond.
``ethtool_opts``
Physical network interface options to apply with ``ethtool``. When used on
bond and bridge interfaces, settings apply to underlying interfaces. This
should be a string of arguments passed to the ``ethtool`` utility, for
example ``"-G ${DEVICE} rx 8192 tx 8192"``.
IP Addresses
------------

@ -0,0 +1,6 @@
---
features:
- |
Adds support for configuring ``ethtool`` options on physical network
interfaces. See `story 2008020
<https://storyboard.openstack.org/#!/story/2008020>`__ for details.

@ -5,7 +5,7 @@
# There are no versioned releases of this role.
version: 8438592c84585c86e62ae07e526d3da53629b377
- src: MichaelRigart.interfaces
version: v1.6.0
version: v1.8.1
- src: mrlesmithjr.manage-lvm
version: v0.1.4
- src: mrlesmithjr.mdadm