Added to ability to set mtu for lxcbr0
The lxc_host role overrides the configuration done by the system administrator on the host. If mtu was defined in /etc/lxc/ and in the system network interfaces, then these configurations will be overriden. This commit should allow the deployer to set the mtu for its lxcbr0 network, by setting the variable lxc_net_mtu. Fixes-Bug: #1518303 Change-Id: I42ab3d0a2c20ae94335de195cdb14579d9f59f5f
This commit is contained in:
parent
2186669e0d
commit
513244b56b
@ -23,6 +23,7 @@ lxc_net_bridge_port: none
|
||||
lxc_net_address: 10.0.3.1
|
||||
lxc_net_netmask: 255.255.255.0
|
||||
lxc_net_gateway: none ## if "none" no gateway will on the LXC bridge, nat must be "false" to use a gateway.
|
||||
#lxc_net_mtu: 1500 ##setting this variable will add mtu configuration for the lxc config and network bridge
|
||||
|
||||
# lxc container nat enabled
|
||||
lxc_net_nat: true ## If "true" nat rules will be created with the lxc network.
|
||||
|
@ -7,6 +7,9 @@ iface {{ lxc_net_bridge }} inet static
|
||||
{% if lxc_net_nat == "true" %}
|
||||
{% if lxc_net_gateway != "none" %}
|
||||
gateway {{ lxc_net_gateway }}
|
||||
{% endif %}
|
||||
{% if lxc_net_mtu is defined %}
|
||||
mtu {{ lxc_net_mtu }}
|
||||
{% endif %}
|
||||
# nat rules start and stop
|
||||
post-up /usr/local/bin/lxc-system-manage iptables-create
|
||||
|
@ -10,4 +10,7 @@ lxc.network.type = {{ lxc_container_net_type }}
|
||||
lxc.network.name = {{ lxc_container_net_name }}
|
||||
lxc.network.link = {{ lxc_container_net_link }}
|
||||
lxc.network.flags = up
|
||||
{% if lxc_net_mtu is defined %}
|
||||
lxc.network.mtu = {{ lxc_net_mtu }}
|
||||
{% endif %}
|
||||
lxc.network.hwaddr = 00:16:3e:xx:xx:xx
|
||||
|
Loading…
Reference in New Issue
Block a user