From 14ea1a2b79aa7a9e7fff284b7d534c0038bbaa89 Mon Sep 17 00:00:00 2001 From: Kyle Mestery Date: Sun, 22 Sep 2013 03:04:56 +0000 Subject: [PATCH] Correctly set the L3 service plugin for ML2 ML2 uses a service plugin for L3. This patch to devstack correctly sets this by setting or updating the variable Q_SERVICE_PLUGIN_CLASSES, which makes ML2 compatible when running with other service plugins (e.g. LBaaS and VPN). Fixes bug 1231622 Change-Id: I0ce1f5a42bd052995135ffac1ee5ef382d69789e --- lib/neutron_plugins/ml2 | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/neutron_plugins/ml2 b/lib/neutron_plugins/ml2 index 71a0638670..8d2e303854 100644 --- a/lib/neutron_plugins/ml2 +++ b/lib/neutron_plugins/ml2 @@ -30,6 +30,9 @@ Q_ML2_PLUGIN_VXLAN_TYPE_OPTIONS=${Q_ML2_PLUGIN_VXLAN_TYPE_OPTIONS:-vni_ranges=10 # Default VLAN TypeDriver options Q_ML2_PLUGIN_VLAN_TYPE_OPTIONS=${Q_ML2_PLUGIN_VLAN_TYPE_OPTIONS:-} +# L3 Plugin to load for ML2 +ML2_L3_PLUGIN=${ML2_L3_PLUGIN:-neutron.services.l3_router.l3_router_plugin.L3RouterPlugin} + function populate_ml2_config() { OPTS=$1 CONF=$2 @@ -48,13 +51,11 @@ function neutron_plugin_configure_common() { Q_PLUGIN_CLASS="neutron.plugins.ml2.plugin.Ml2Plugin" # The ML2 plugin delegates L3 routing/NAT functionality to # the L3 service plugin which must therefore be specified. - Q_L3_PLUGIN_CLASS=${Q_L3_PLUGIN_CLASS:-"neutron.services.l3_router.l3_router_plugin.L3RouterPlugin"} - if ini_has_option $NEUTRON_CONF DEFAULT service_plugins ; then - srv_plugins=$(iniget $NEUTRON_CONF DEFAULT service_plugins)","$Q_L3_PLUGIN_CLASS + if [[ $Q_SERVICE_PLUGIN_CLASSES == '' ]]; then + Q_SERVICE_PLUGIN_CLASSES=$ML2_L3_PLUGIN else - srv_plugins=$Q_L3_PLUGIN_CLASS + Q_SERVICE_PLUGIN_CLASSES="$Q_SERVICE_PLUGIN_CLASSES,$ML2_L3_PLUGIN" fi - iniset $NEUTRON_CONF DEFAULT service_plugins $srv_plugins } function neutron_plugin_configure_service() {