Augment instead of override extra ML2 options.
The existing ML2 code overwrote extra options set in localrc with defualt values in some cases. This fixes it so it no longer does that and instead adds to rather than overrides those values. Fixes bug 1222854 Change-Id: Iafdaad7d4253f1b61e8a214c50adaf7599a641f2
This commit is contained in:
parent
b567fc1f6b
commit
061d52507d
@ -10,9 +10,9 @@ set +o xtrace
|
||||
Q_ML2_TENANT_NETWORK_TYPE=${Q_ML2_TENANT_NETWORK_TYPE:-}
|
||||
# This has to be set here since the agent will set this in the config file
|
||||
if [[ "$Q_ML2_TENANT_NETWORK_TYPE" != "" ]]; then
|
||||
Q_AGENT_EXTRA_AGENT_OPTS=(tunnel_types=$Q_ML2_TENANT_NETWORK_TYPE)
|
||||
Q_AGENT_EXTRA_AGENT_OPTS+=(tunnel_types=$Q_ML2_TENANT_NETWORK_TYPE)
|
||||
elif [[ "$ENABLE_TENANT_TUNNELS" = "True" ]]; then
|
||||
Q_AGENT_EXTRA_AGENT_OPTS=(tunnel_types=gre)
|
||||
Q_AGENT_EXTRA_AGENT_OPTS+=(tunnel_types=gre)
|
||||
fi
|
||||
|
||||
# Default openvswitch L2 agent
|
||||
@ -50,14 +50,14 @@ function neutron_plugin_configure_common() {
|
||||
|
||||
function neutron_plugin_configure_service() {
|
||||
if [[ "$Q_ML2_TENANT_NETWORK_TYPE" != "" ]]; then
|
||||
Q_SRV_EXTRA_OPTS=(tenant_network_types=$Q_ML2_TENANT_NETWORK_TYPE)
|
||||
Q_SRV_EXTRA_OPTS+=(tenant_network_types=$Q_ML2_TENANT_NETWORK_TYPE)
|
||||
elif [[ "$ENABLE_TENANT_TUNNELS" = "True" ]]; then
|
||||
# This assumes you want a simple configuration, and will overwrite
|
||||
# Q_SRV_EXTRA_OPTS if set in addition to ENABLE_TENANT_TUNNELS.
|
||||
Q_SRV_EXTRA_OPTS=(tenant_network_types=gre)
|
||||
Q_SRV_EXTRA_OPTS+=(tenant_network_types=gre)
|
||||
Q_ML2_PLUGIN_GRE_TYPE_OPTIONS=(tunnel_id_ranges=$TENANT_TUNNEL_RANGES)
|
||||
elif [[ "$ENABLE_TENANT_VLANS" = "True" ]]; then
|
||||
Q_SRV_EXTRA_OPTS=(tenant_network_types=vlan)
|
||||
Q_SRV_EXTRA_OPTS+=(tenant_network_types=vlan)
|
||||
else
|
||||
echo "WARNING - The ml2 plugin is using local tenant networks, with no connectivity between hosts."
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user