Browse code

Merge "Introduce PUBLIC_BRIDGE_MTU variable to set br-ex MTU" into stable/liberty

Jenkins authored on 2016/07/20 05:54:19
Showing 4 changed files
... ...
@@ -645,6 +645,15 @@ function create_disk {
645 645
     fi
646 646
 }
647 647
 
648
+
649
+# set_mtu - Set MTU on a device
650
+function set_mtu {
651
+    local dev=$1
652
+    local mtu=$2
653
+    sudo ip link set mtu $mtu dev $dev
654
+}
655
+
656
+
648 657
 # Restore xtrace
649 658
 $XTRACE
650 659
 
... ...
@@ -171,6 +171,7 @@ PROVIDER_SUBNET_NAME=${PROVIDER_SUBNET_NAME:-"provider_net"}
171 171
 # Define the public bridge that will transmit traffic from VMs to the
172 172
 # physical network - used by both the OVS and Linux Bridge drivers.
173 173
 PUBLIC_BRIDGE=${PUBLIC_BRIDGE:-br-ex}
174
+PUBLIC_BRIDGE_MTU=${PUBLIC_BRIDGE_MTU:-1500}
174 175
 
175 176
 # Use flat providernet for public network
176 177
 #
... ...
@@ -48,6 +48,7 @@ function neutron_plugin_configure_dhcp_agent {
48 48
 
49 49
 function neutron_plugin_configure_l3_agent {
50 50
     sudo brctl addbr $PUBLIC_BRIDGE
51
+    set_mtu $PUBLIC_BRIDGE $PUBLIC_BRIDGE_MTU
51 52
     iniset $Q_L3_CONF_FILE DEFAULT external_network_bridge
52 53
     iniset $Q_L3_CONF_FILE DEFAULT l3_agent_manager neutron.agent.l3_agent.L3NATAgentWithStateReport
53 54
 }
... ...
@@ -102,11 +102,16 @@ function _neutron_ovs_base_configure_l3_agent {
102 102
         sudo ip link set $Q_PUBLIC_VETH_EX up
103 103
         sudo ip addr flush dev $Q_PUBLIC_VETH_EX
104 104
     else
105
-        _neutron_ovs_base_add_bridge $PUBLIC_BRIDGE
105
+        _neutron_ovs_base_add_public_bridge
106 106
         sudo ovs-vsctl br-set-external-id $PUBLIC_BRIDGE bridge-id $PUBLIC_BRIDGE
107 107
     fi
108 108
 }
109 109
 
110
+function _neutron_ovs_base_add_public_bridge {
111
+    _neutron_ovs_base_add_bridge $PUBLIC_BRIDGE
112
+    set_mtu $PUBLIC_BRIDGE $PUBLIC_BRIDGE_MTU
113
+}
114
+
110 115
 function _neutron_ovs_base_configure_nova_vif_driver {
111 116
     :
112 117
 }