...
|
...
|
@@ -32,6 +32,17 @@ NEUTRON_AGENT=${NEUTRON_AGENT:-openvswitch}
|
32
|
32
|
NEUTRON_DIR=$DEST/neutron
|
33
|
33
|
NEUTRON_AUTH_CACHE_DIR=${NEUTRON_AUTH_CACHE_DIR:-/var/cache/neutron}
|
34
|
34
|
|
|
35
|
+NEUTRON_DISTRIBUTED_ROUTING=$(trueorfalse False NEUTRON_DISTRIBUTED_ROUTING)
|
|
36
|
+# Distributed Virtual Router (DVR) configuration
|
|
37
|
+# Can be:
|
|
38
|
+# - ``legacy`` - No DVR functionality
|
|
39
|
+# - ``dvr_snat`` - Controller or single node DVR
|
|
40
|
+# - ``dvr`` - Compute node in multi-node DVR
|
|
41
|
+# - ``dvr_no_external`` - Compute node in multi-node DVR, no external network
|
|
42
|
+#
|
|
43
|
+# Default is 'dvr_snat' since it can handle both DVR and legacy routers
|
|
44
|
+NEUTRON_DVR_MODE=${NEUTRON_DVR_MODE:-dvr_snat}
|
|
45
|
+
|
35
|
46
|
NEUTRON_BIN_DIR=$(get_python_exec_prefix)
|
36
|
47
|
NEUTRON_DHCP_BINARY="neutron-dhcp-agent"
|
37
|
48
|
|
...
|
...
|
@@ -174,6 +185,7 @@ function configure_neutron_new {
|
174
|
174
|
|
175
|
175
|
iniset $NEUTRON_CONF DEFAULT policy_file $policy_file
|
176
|
176
|
iniset $NEUTRON_CONF DEFAULT allow_overlapping_ips True
|
|
177
|
+ iniset $NEUTRON_CONF DEFAULT router_distributed $NEUTRON_DISTRIBUTED_ROUTING
|
177
|
178
|
|
178
|
179
|
iniset $NEUTRON_CONF DEFAULT auth_strategy $NEUTRON_AUTH_STRATEGY
|
179
|
180
|
configure_auth_token_middleware $NEUTRON_CONF neutron $NEUTRON_AUTH_CACHE_DIR keystone_authtoken
|
...
|
...
|
@@ -182,7 +194,15 @@ function configure_neutron_new {
|
182
|
182
|
# Configure VXLAN
|
183
|
183
|
# TODO(sc68cal) not hardcode?
|
184
|
184
|
iniset $NEUTRON_CORE_PLUGIN_CONF ml2 tenant_network_types vxlan
|
185
|
|
- iniset $NEUTRON_CORE_PLUGIN_CONF ml2 mechanism_drivers openvswitch,linuxbridge
|
|
185
|
+
|
|
186
|
+ local mech_drivers="openvswitch"
|
|
187
|
+ if [[ "$NEUTRON_DISTRIBUTED_ROUTING" = "True" ]]; then
|
|
188
|
+ mech_drivers+=",l2population"
|
|
189
|
+ else
|
|
190
|
+ mech_drivers+=",linuxbridge"
|
|
191
|
+ fi
|
|
192
|
+ iniset $NEUTRON_CORE_PLUGIN_CONF ml2 mechanism_drivers $mech_drivers
|
|
193
|
+
|
186
|
194
|
iniset $NEUTRON_CORE_PLUGIN_CONF ml2_type_vxlan vni_ranges 1001:2000
|
187
|
195
|
iniset $NEUTRON_CORE_PLUGIN_CONF ml2_type_flat flat_networks public
|
188
|
196
|
if [[ "$NEUTRON_PORT_SECURITY" = "True" ]]; then
|
...
|
...
|
@@ -203,6 +223,11 @@ function configure_neutron_new {
|
203
|
203
|
else
|
204
|
204
|
iniset $NEUTRON_CORE_PLUGIN_CONF securitygroup firewall_driver iptables_hybrid
|
205
|
205
|
iniset $NEUTRON_CORE_PLUGIN_CONF ovs local_ip $HOST_IP
|
|
206
|
+
|
|
207
|
+ if [[ "$NEUTRON_DISTRIBUTED_ROUTING" = "True" ]]; then
|
|
208
|
+ iniset $NEUTRON_CORE_PLUGIN_CONF agent l2_population True
|
|
209
|
+ iniset $NEUTRON_CORE_PLUGIN_CONF agent enable_distributed_routing True
|
|
210
|
+ fi
|
206
|
211
|
fi
|
207
|
212
|
|
208
|
213
|
if ! running_in_container; then
|
...
|
...
|
@@ -237,6 +262,10 @@ function configure_neutron_new {
|
237
|
237
|
else
|
238
|
238
|
iniset $NEUTRON_CORE_PLUGIN_CONF ovs bridge_mappings "$PUBLIC_NETWORK_NAME:$PUBLIC_BRIDGE"
|
239
|
239
|
fi
|
|
240
|
+
|
|
241
|
+ if [[ "$NEUTRON_DISTRIBUTED_ROUTING" = "True" ]]; then
|
|
242
|
+ iniset $NEUTRON_L3_CONF DEFAULT agent_mode $NEUTRON_DVR_MODE
|
|
243
|
+ fi
|
240
|
244
|
fi
|
241
|
245
|
|
242
|
246
|
# Metadata
|