From 2307f9de752244104ba049cef380916c87918060 Mon Sep 17 00:00:00 2001 From: Akihiro Motoki Date: Sat, 9 Aug 2014 18:58:20 +0900 Subject: [PATCH] Avoid using deprecated Q_AGENT_EXTRA_AGENT_OPTS in ML2 setup Q_AGENT_EXTRA_AGENT_OPTS is deprecated now and stack.sh displays the warning that it will be removed early in "K" cycle. Neutron ML2 devstack uses Q_AGENT_EXTRA_AGENT_OPTS to pass tunnel configurations to Neutron plugin agents. This commit removes the usage of Q_AGENT_EXTRA_AGENT_OPTS and configures these config options directly. Change-Id: I7fc1613ff78c0a8b1e80cc041b06f5d4680c34f2 Closes-Bug: #1354670 --- lib/neutron_plugins/linuxbridge_agent | 1 + lib/neutron_plugins/ml2 | 6 +++--- lib/neutron_plugins/ofagent_agent | 1 + lib/neutron_plugins/openvswitch_agent | 1 + 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/neutron_plugins/linuxbridge_agent b/lib/neutron_plugins/linuxbridge_agent index 82b5fc903d..2638dd3725 100644 --- a/lib/neutron_plugins/linuxbridge_agent +++ b/lib/neutron_plugins/linuxbridge_agent @@ -47,6 +47,7 @@ function neutron_plugin_configure_plugin_agent { iniset /$Q_PLUGIN_CONF_FILE securitygroup firewall_driver neutron.agent.firewall.NoopFirewallDriver fi AGENT_BINARY="$NEUTRON_BIN_DIR/neutron-linuxbridge-agent" + iniset /$Q_PLUGIN_CONF_FILE agent tunnel_types $Q_TUNNEL_TYPES # Define extra "AGENT" configuration options when q-agt is configured by defining # the array ``Q_AGENT_EXTRA_AGENT_OPTS``. # For Example: ``Q_AGENT_EXTRA_AGENT_OPTS=(foo=true bar=2)`` diff --git a/lib/neutron_plugins/ml2 b/lib/neutron_plugins/ml2 index 42dd57f3d2..44b947f380 100644 --- a/lib/neutron_plugins/ml2 +++ b/lib/neutron_plugins/ml2 @@ -6,13 +6,13 @@ ML2_XTRACE=$(set +o | grep xtrace) set +o xtrace # Enable this to simply and quickly enable tunneling with ML2. -# Select either 'gre', 'vxlan', or '(gre vxlan)' +# Select either 'gre', 'vxlan', or 'gre,vxlan' Q_ML2_TENANT_NETWORK_TYPE=${Q_ML2_TENANT_NETWORK_TYPE:-"vxlan"} # This has to be set here since the agent will set this in the config file if [[ "$Q_ML2_TENANT_NETWORK_TYPE" == "gre" || "$Q_ML2_TENANT_NETWORK_TYPE" == "vxlan" ]]; then - Q_AGENT_EXTRA_AGENT_OPTS+=(tunnel_types=$Q_ML2_TENANT_NETWORK_TYPE) + Q_TUNNEL_TYPES=$Q_ML2_TENANT_NETWORK_TYPE elif [[ "$ENABLE_TENANT_TUNNELS" == "True" ]]; then - Q_AGENT_EXTRA_AGENT_OPTS+=(tunnel_types=gre) + Q_TUNNEL_TYPES=gre fi # Default openvswitch L2 agent diff --git a/lib/neutron_plugins/ofagent_agent b/lib/neutron_plugins/ofagent_agent index 66283ad67c..b4c2ada873 100644 --- a/lib/neutron_plugins/ofagent_agent +++ b/lib/neutron_plugins/ofagent_agent @@ -71,6 +71,7 @@ function neutron_plugin_configure_plugin_agent { fi AGENT_BINARY="$NEUTRON_BIN_DIR/neutron-ofagent-agent" + iniset /$Q_PLUGIN_CONF_FILE agent tunnel_types $Q_TUNNEL_TYPES # Define extra "AGENT" configuration options when q-agt is configured by defining # defining the array ``Q_AGENT_EXTRA_AGENT_OPTS``. # For Example: ``Q_AGENT_EXTRA_AGENT_OPTS=(foo=true bar=2)`` diff --git a/lib/neutron_plugins/openvswitch_agent b/lib/neutron_plugins/openvswitch_agent index 5adb0c5e43..3fc37deb90 100644 --- a/lib/neutron_plugins/openvswitch_agent +++ b/lib/neutron_plugins/openvswitch_agent @@ -102,6 +102,7 @@ function neutron_plugin_configure_plugin_agent { # Set root wrap iniset "/$Q_PLUGIN_CONF_FILE.domU" agent root_helper "$Q_RR_COMMAND" fi + iniset /$Q_PLUGIN_CONF_FILE agent tunnel_types $Q_TUNNEL_TYPES # Define extra "AGENT" configuration options when q-agt is configured by defining # defining the array ``Q_AGENT_EXTRA_AGENT_OPTS``. # For Example: ``Q_AGENT_EXTRA_AGENT_OPTS=(foo=true bar=2)``