From 992697e9102862aa081c5fda244759601d128b13 Mon Sep 17 00:00:00 2001 From: Al Miller Date: Mon, 2 Mar 2015 19:35:20 -0800 Subject: [PATCH] Allow LBaaS service provider to be configurable in devstack Define the NEUTRON_LBAAS_SERVICE_PROVIDER environment variable that allows the service provider to be defined in the localrc when using devstack. Also, use the agent driver as the default. Change-Id: I8e8ce74eb0847f027209e451d2589db6272ed6d6 Depends-On: Icf34a215e094d27270a5f64df2d1cb995f505370 Depends-On: I51e13a4555e777438af048dd580eacc592435296 --- devstack/plugin.sh | 8 +++++--- devstack/settings | 7 +++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/devstack/plugin.sh b/devstack/plugin.sh index a57cc3487..b0b929f79 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -18,10 +18,12 @@ function neutron_lbaas_configure_common { cp $NEUTRON_LBAAS_DIR/etc/neutron_lbaas.conf $NEUTRON_LBAAS_CONF - if is_service_enabled $LBAAS_V2; then + if is_service_enabled $LBAAS_V1; then inicomment $NEUTRON_LBAAS_CONF service_providers service_provider - iniadd $NEUTRON_LBAAS_CONF service_providers service_provider\ - "LOADBALANCERV2:Haproxy:neutron_lbaas.services.loadbalancer.drivers.haproxy.synchronous_namespace_driver.HaproxyNSDriver:default" + iniadd $NEUTRON_LBAAS_CONF service_providers service_provider $NEUTRON_LBAAS_SERVICE_PROVIDERV1 + elif is_service_enabled $LBAAS_V2; then + inicomment $NEUTRON_LBAAS_CONF service_providers service_provider + iniadd $NEUTRON_LBAAS_CONF service_providers service_provider $NEUTRON_LBAAS_SERVICE_PROVIDERV2 fi if is_service_enabled $LBAAS_V1; then diff --git a/devstack/settings b/devstack/settings index 6f80ab294..0fd5f2ee1 100644 --- a/devstack/settings +++ b/devstack/settings @@ -12,8 +12,11 @@ LBAAS_ANY="$LBAAS_V1 $LBAAS_V2" LBAAS_AGENT_CONF_PATH=/etc/neutron/services/loadbalancer/haproxy LBAAS_AGENT_CONF_FILENAME=$LBAAS_AGENT_CONF_PATH/lbaas_agent.ini -LBAASV1_PLUGIN=neutron_lbaas.services.loadbalancer.plugin.LoadBalancerPlugin -LBAASV2_PLUGIN=neutron_lbaas.services.loadbalancer.plugin.LoadBalancerPluginv2 +LBAASV1_PLUGIN=${LBAASV1_PLUGIN:-"neutron_lbaas.services.loadbalancer.plugin.LoadBalancerPlugin"} +LBAASV2_PLUGIN=${LBAASV2_PLUGIN:-"neutron_lbaas.services.loadbalancer.plugin.LoadBalancerPluginv2"} NEUTRON_LBAAS_DIR=$DEST/neutron-lbaas NEUTRON_LBAAS_CONF=$NEUTRON_CONF_DIR/neutron_lbaas.conf + +NEUTRON_LBAAS_SERVICE_PROVIDERV1=${NEUTRON_LBAAS_SERVICE_PROVIDERV1:-"LOADBALANCER:Haproxy:neutron_lbaas.services.loadbalancer.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver:default"} +NEUTRON_LBAAS_SERVICE_PROVIDERV2=${NEUTRON_LBAAS_SERVICE_PROVIDERV2:-"LOADBALANCERV2:Haproxy:neutron_lbaas.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver:default"}