Browse code

Use real Neutron network for L3 GW by default

Relying on 'external_network_bridge=br-ex' for the L3
agent has been deprecated in Neutron. This patch adjusts
the devstack defaults to setup Neutron in the preferred
manner (empty external_network_bridge value and
correct bridge_mappings for the L2 agent).

This will also help with correct MTU calculations now that
the external network will have the correct segmentation
type on it ('flat' now instead of 'vxlan' by default).

Related-Bug: #1511578
Related-Bug: #1603493
Change-Id: Id20e67aba5dfd2044b82c700f41c6e648b529430

Kevin Benton authored on 2016/07/18 13:19:30
Showing 2 changed files
... ...
@@ -203,7 +203,7 @@ TENANT_VLAN_RANGE=${TENANT_VLAN_RANGE:-}
203 203
 # agent, as described below.
204 204
 #
205 205
 # Example: ``PHYSICAL_NETWORK=default``
206
-PHYSICAL_NETWORK=${PHYSICAL_NETWORK:-}
206
+PHYSICAL_NETWORK=${PHYSICAL_NETWORK:-public}
207 207
 
208 208
 # With the openvswitch agent, if using VLANs for tenant networks,
209 209
 # or if using flat or VLAN provider networks, set in ``localrc`` to
... ...
@@ -213,7 +213,7 @@ PHYSICAL_NETWORK=${PHYSICAL_NETWORK:-}
213 213
 # port for external connectivity.
214 214
 #
215 215
 # Example: ``OVS_PHYSICAL_BRIDGE=br-eth1``
216
-OVS_PHYSICAL_BRIDGE=${OVS_PHYSICAL_BRIDGE:-}
216
+OVS_PHYSICAL_BRIDGE=${OVS_PHYSICAL_BRIDGE:-br-ex}
217 217
 
218 218
 # With the linuxbridge agent, if using VLANs for tenant networks,
219 219
 # or if using flat or VLAN provider networks, set in ``localrc`` to
... ...
@@ -17,6 +17,11 @@ IPV6_PROVIDER_NETWORK_GATEWAY=${IPV6_PROVIDER_NETWORK_GATEWAY:-}
17 17
 PUBLIC_BRIDGE=${PUBLIC_BRIDGE:-br-ex}
18 18
 PUBLIC_BRIDGE_MTU=${PUBLIC_BRIDGE_MTU:-1500}
19 19
 
20
+# If Q_ASSIGN_GATEWAY_TO_PUBLIC_BRIDGE=True, assign the gateway IP of the public
21
+# subnet to the public bridge interface even if Q_USE_PROVIDERNET_FOR_PUBLIC is
22
+# used.
23
+Q_ASSIGN_GATEWAY_TO_PUBLIC_BRIDGE=${Q_ASSIGN_GATEWAY_TO_PUBLIC_BRIDGE:-True}
24
+
20 25
 # If Q_USE_PUBLIC_VETH=True, create and use a veth pair instead of
21 26
 # PUBLIC_BRIDGE.  This is intended to be used with
22 27
 # Q_USE_PROVIDERNET_FOR_PUBLIC=True.
... ...
@@ -51,7 +56,7 @@ Q_L3_ROUTER_PER_TENANT=${Q_L3_ROUTER_PER_TENANT:-True}
51 51
 #    Q_USE_PROVIDERNET_FOR_PUBLIC=True
52 52
 #    PUBLIC_PHYSICAL_NETWORK=public
53 53
 #    OVS_BRIDGE_MAPPINGS=public:br-ex
54
-Q_USE_PROVIDERNET_FOR_PUBLIC=${Q_USE_PROVIDERNET_FOR_PUBLIC:-False}
54
+Q_USE_PROVIDERNET_FOR_PUBLIC=${Q_USE_PROVIDERNET_FOR_PUBLIC:-True}
55 55
 PUBLIC_PHYSICAL_NETWORK=${PUBLIC_PHYSICAL_NETWORK:-public}
56 56
 
57 57
 # Generate 40-bit IPv6 Global ID to comply with RFC 4193
... ...
@@ -305,7 +310,7 @@ function _neutron_configure_router_v4 {
305 305
             local cidr_len=${FLOATING_RANGE#*/}
306 306
             local testcmd="ip -o link | grep -q $ext_gw_interface"
307 307
             test_with_retry "$testcmd" "$ext_gw_interface creation failed"
308
-            if [[ $(ip addr show dev $ext_gw_interface | grep -c $ext_gw_ip) == 0 && ( $Q_USE_PROVIDERNET_FOR_PUBLIC == "False" || $Q_USE_PUBLIC_VETH == "True" ) ]]; then
308
+            if [[ $(ip addr show dev $ext_gw_interface | grep -c $ext_gw_ip) == 0 && ( $Q_USE_PROVIDERNET_FOR_PUBLIC == "False" || $Q_USE_PUBLIC_VETH == "True" || $Q_ASSIGN_GATEWAY_TO_PUBLIC_BRIDGE == "True" ) ]]; then
309 309
                 sudo ip addr add $ext_gw_ip/$cidr_len dev $ext_gw_interface
310 310
                 sudo ip link set $ext_gw_interface up
311 311
             fi