Introduce PUBLIC_BRIDGE_MTU variable to set br-ex MTU
This variable can be used to accommodate for underlying infrastructure
that does not provide full 1500-sized traffic, or maybe instead gives
access to Jumbo frames.
Conflicts:
lib/neutron_plugins/linuxbridge_agent
lib/neutron_plugins/openvswitch_agent
lib/neutron_plugins/services/l3
Change-Id: I38a80bac18673a30842a7b997d0669fed5aff976
Related-Bug: #1603268
(cherry picked from commit 7b5c7dce53
)
This commit is contained in:
parent
e16da5130b
commit
b078590721
|
@ -668,6 +668,15 @@ function create_disk {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# set_mtu - Set MTU on a device
|
||||||
|
function set_mtu {
|
||||||
|
local dev=$1
|
||||||
|
local mtu=$2
|
||||||
|
sudo ip link set mtu $mtu dev $dev
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# Restore xtrace
|
# Restore xtrace
|
||||||
$_XTRACE_FUNCTIONS
|
$_XTRACE_FUNCTIONS
|
||||||
|
|
||||||
|
|
|
@ -183,6 +183,7 @@ IPV6_PROVIDER_NETWORK_GATEWAY=${IPV6_PROVIDER_NETWORK_GATEWAY:-}
|
||||||
# Define the public bridge that will transmit traffic from VMs to the
|
# Define the public bridge that will transmit traffic from VMs to the
|
||||||
# physical network - used by both the OVS and Linux Bridge drivers.
|
# physical network - used by both the OVS and Linux Bridge drivers.
|
||||||
PUBLIC_BRIDGE=${PUBLIC_BRIDGE:-br-ex}
|
PUBLIC_BRIDGE=${PUBLIC_BRIDGE:-br-ex}
|
||||||
|
PUBLIC_BRIDGE_MTU=${PUBLIC_BRIDGE_MTU:-1500}
|
||||||
|
|
||||||
# Use flat providernet for public network
|
# Use flat providernet for public network
|
||||||
#
|
#
|
||||||
|
|
|
@ -48,6 +48,7 @@ function neutron_plugin_configure_dhcp_agent {
|
||||||
|
|
||||||
function neutron_plugin_configure_l3_agent {
|
function neutron_plugin_configure_l3_agent {
|
||||||
sudo brctl addbr $PUBLIC_BRIDGE
|
sudo brctl addbr $PUBLIC_BRIDGE
|
||||||
|
set_mtu $PUBLIC_BRIDGE $PUBLIC_BRIDGE_MTU
|
||||||
iniset $Q_L3_CONF_FILE DEFAULT external_network_bridge
|
iniset $Q_L3_CONF_FILE DEFAULT external_network_bridge
|
||||||
iniset $Q_L3_CONF_FILE DEFAULT l3_agent_manager neutron.agent.l3_agent.L3NATAgentWithStateReport
|
iniset $Q_L3_CONF_FILE DEFAULT l3_agent_manager neutron.agent.l3_agent.L3NATAgentWithStateReport
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,7 +102,7 @@ function neutron_plugin_configure_plugin_agent {
|
||||||
sudo ovs-vsctl -- --may-exist add-port "br-$GUEST_INTERFACE_DEFAULT" $GUEST_INTERFACE_DEFAULT
|
sudo ovs-vsctl -- --may-exist add-port "br-$GUEST_INTERFACE_DEFAULT" $GUEST_INTERFACE_DEFAULT
|
||||||
|
|
||||||
# Create external bridge and add port
|
# Create external bridge and add port
|
||||||
_neutron_ovs_base_add_bridge $PUBLIC_BRIDGE
|
_neutron_ovs_base_add_public_bridge
|
||||||
sudo ovs-vsctl -- --may-exist add-port $PUBLIC_BRIDGE $PUBLIC_INTERFACE_DEFAULT
|
sudo ovs-vsctl -- --may-exist add-port $PUBLIC_BRIDGE $PUBLIC_INTERFACE_DEFAULT
|
||||||
|
|
||||||
# Set bridge mappings to "physnet1:br-$GUEST_INTERFACE_DEFAULT"
|
# Set bridge mappings to "physnet1:br-$GUEST_INTERFACE_DEFAULT"
|
||||||
|
|
|
@ -105,11 +105,16 @@ function _neutron_ovs_base_configure_l3_agent {
|
||||||
sudo ip link set $Q_PUBLIC_VETH_EX up
|
sudo ip link set $Q_PUBLIC_VETH_EX up
|
||||||
sudo ip addr flush dev $Q_PUBLIC_VETH_EX
|
sudo ip addr flush dev $Q_PUBLIC_VETH_EX
|
||||||
else
|
else
|
||||||
_neutron_ovs_base_add_bridge $PUBLIC_BRIDGE
|
_neutron_ovs_base_add_public_bridge
|
||||||
sudo ovs-vsctl br-set-external-id $PUBLIC_BRIDGE bridge-id $PUBLIC_BRIDGE
|
sudo ovs-vsctl br-set-external-id $PUBLIC_BRIDGE bridge-id $PUBLIC_BRIDGE
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function _neutron_ovs_base_add_public_bridge {
|
||||||
|
_neutron_ovs_base_add_bridge $PUBLIC_BRIDGE
|
||||||
|
set_mtu $PUBLIC_BRIDGE $PUBLIC_BRIDGE_MTU
|
||||||
|
}
|
||||||
|
|
||||||
function _neutron_ovs_base_configure_nova_vif_driver {
|
function _neutron_ovs_base_configure_nova_vif_driver {
|
||||||
:
|
:
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue