From 6f335b9a4b093cd96ebf8373e9014120f461e382 Mon Sep 17 00:00:00 2001 From: Edgar Magana Date: Thu, 10 Jul 2014 15:42:44 -0700 Subject: [PATCH] Add a Tunnel end-point variable for Neutron configuration The HOST_IP address is being used as IP address for end-point tunnel configruation. A new variable is needed to specify a different IP address for the tunnel end-point that Neutron will use Change-Id: Ic7fb4853df167e78bf882af6a712b903db754dc2 Closes-bug: #1340433 --- lib/neutron | 7 +++++++ lib/neutron_plugins/ml2 | 2 +- lib/neutron_plugins/ofagent_agent | 2 +- lib/neutron_plugins/openvswitch_agent | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lib/neutron b/lib/neutron index 603987216b..6594334e2d 100644 --- a/lib/neutron +++ b/lib/neutron @@ -203,6 +203,13 @@ OVS_PHYSICAL_BRIDGE=${OVS_PHYSICAL_BRIDGE:-} # Example: ``LB_PHYSICAL_INTERFACE=eth1`` LB_PHYSICAL_INTERFACE=${LB_PHYSICAL_INTERFACE:-} +# When Neutron tunnels are enabled it is needed to specify the +# IP address of the end point in the local server. This IP is set +# by default to the same IP address that the HOST IP. +# This variable can be used to specify a different end point IP address +# Example: ``TUNNEL_ENDPOINT_IP=1.1.1.1`` +TUNNEL_ENDPOINT_IP=${TUNNEL_ENDPOINT_IP:-$HOST_IP} + # With the openvswitch plugin, set to True in ``localrc`` to enable # provider GRE tunnels when ``ENABLE_TENANT_TUNNELS`` is False. # diff --git a/lib/neutron_plugins/ml2 b/lib/neutron_plugins/ml2 index 99663733e1..8e131bbb94 100644 --- a/lib/neutron_plugins/ml2 +++ b/lib/neutron_plugins/ml2 @@ -99,7 +99,7 @@ function neutron_plugin_configure_service { fi # Since we enable the tunnel TypeDrivers, also enable a local_ip - iniset /$Q_PLUGIN_CONF_FILE ovs local_ip $HOST_IP + iniset /$Q_PLUGIN_CONF_FILE ovs local_ip $TUNNEL_ENDPOINT_IP populate_ml2_config /$Q_PLUGIN_CONF_FILE ml2 mechanism_drivers=$Q_ML2_PLUGIN_MECHANISM_DRIVERS diff --git a/lib/neutron_plugins/ofagent_agent b/lib/neutron_plugins/ofagent_agent index b8321f3375..66283ad67c 100644 --- a/lib/neutron_plugins/ofagent_agent +++ b/lib/neutron_plugins/ofagent_agent @@ -54,7 +54,7 @@ function neutron_plugin_configure_plugin_agent { die $LINENO "You are running OVS version $OVS_VERSION. OVS 1.4+ is required for tunneling between multiple hosts." fi iniset /$Q_PLUGIN_CONF_FILE ovs enable_tunneling True - iniset /$Q_PLUGIN_CONF_FILE ovs local_ip $HOST_IP + iniset /$Q_PLUGIN_CONF_FILE ovs local_ip $TUNNEL_ENDPOINT_IP fi # Setup physical network bridge mappings. Override diff --git a/lib/neutron_plugins/openvswitch_agent b/lib/neutron_plugins/openvswitch_agent index fbc013f565..5adb0c5e43 100644 --- a/lib/neutron_plugins/openvswitch_agent +++ b/lib/neutron_plugins/openvswitch_agent @@ -48,7 +48,7 @@ function neutron_plugin_configure_plugin_agent { die $LINENO "You are running OVS version $OVS_VERSION. OVS 1.4+ is required for tunneling between multiple hosts." fi iniset /$Q_PLUGIN_CONF_FILE ovs enable_tunneling True - iniset /$Q_PLUGIN_CONF_FILE ovs local_ip $HOST_IP + iniset /$Q_PLUGIN_CONF_FILE ovs local_ip $TUNNEL_ENDPOINT_IP fi # Setup physical network bridge mappings. Override