Ability to define the mtu globally (for all the container networks)
Currently, deployers can override MTUs on a per-network basis, but may be looking for a way to define the mtu globally. This implements a variable named ``lxc_container_default_mtu`` that currently defaults to 1500 (standard value). If this variable is set, it will globally override the mtu, while still keeping the per-network override. Change-Id: Ia7e4f9e929f513ddc09e6de9467ec6ff765e2e6f Closes-Bug: #1518311
This commit is contained in:
parent
311a3108c9
commit
6e94a195ec
@ -54,6 +54,7 @@ lxc_container_default_interfaces: |
|
||||
# Load any additional configs
|
||||
source /etc/network/interfaces.d/*.cfg
|
||||
|
||||
lxc_container_default_mtu: "1500"
|
||||
# The container interface variable is a a default object that assume the
|
||||
# Ansible iterator type is `with_dict`.
|
||||
lxc_container_interface: |
|
||||
|
@ -15,4 +15,4 @@ lxc.network.hwaddr = 00:16:3e:xx:xx:xx
|
||||
# enable the device on boot
|
||||
lxc.network.flags = up
|
||||
# Set the container network MTU
|
||||
lxc.network.mtu = {{ item.value.mtu|default('1500') }}
|
||||
lxc.network.mtu = {{ item.value.mtu|default(lxc_container_default_mtu) }}
|
||||
|
Loading…
Reference in New Issue
Block a user