Browse code

Remove lbaas from devstack proper, take 2

p-c patches have merged, neutron-lbaas removal is in the merge queue.

This reverts commit b3f26cb66c70b599c4d77945f2bdadd9537c7c35.

Depends-On: I506949e75bc62681412358ba689cb07b16311b68
Change-Id: I98d62c13ef90b20a9c67ef4f1720efcaa366fb31

Doug Wiegley authored on 2016/08/21 01:32:14
Showing 3 changed files
... ...
@@ -74,7 +74,6 @@ GITDIR["python-neutronclient"]=$DEST/python-neutronclient
74 74
 
75 75
 NEUTRON_DIR=$DEST/neutron
76 76
 NEUTRON_FWAAS_DIR=$DEST/neutron-fwaas
77
-NEUTRON_LBAAS_DIR=$DEST/neutron-lbaas
78 77
 NEUTRON_AUTH_CACHE_DIR=${NEUTRON_AUTH_CACHE_DIR:-/var/cache/neutron}
79 78
 
80 79
 # Support entry points installation of console scripts
... ...
@@ -88,9 +87,6 @@ NEUTRON_CONF_DIR=/etc/neutron
88 88
 NEUTRON_CONF=$NEUTRON_CONF_DIR/neutron.conf
89 89
 export NEUTRON_TEST_CONFIG_FILE=${NEUTRON_TEST_CONFIG_FILE:-"$NEUTRON_CONF_DIR/debug.ini"}
90 90
 
91
-# Default provider for load balancer service
92
-DEFAULT_LB_PROVIDER=LOADBALANCER:Haproxy:neutron_lbaas.services.loadbalancer.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver:default
93
-
94 91
 # Agent binaries.  Note, binary paths for other agents are set in per-service
95 92
 # scripts in lib/neutron_plugins/services/
96 93
 AGENT_DHCP_BINARY="$NEUTRON_BIN_DIR/neutron-dhcp-agent"
... ...
@@ -252,12 +248,6 @@ if [ -f $TOP_DIR/lib/neutron_plugins/$Q_PLUGIN ]; then
252 252
     source $TOP_DIR/lib/neutron_plugins/$Q_PLUGIN
253 253
 fi
254 254
 
255
-# Agent loadbalancer service plugin functions
256
-# -------------------------------------------
257
-
258
-# Hardcoding for 1 service plugin for now
259
-source $TOP_DIR/lib/neutron_plugins/services/loadbalancer
260
-
261 255
 # Agent metering service plugin functions
262 256
 # -------------------------------------------
263 257
 
... ...
@@ -316,10 +306,6 @@ function configure_mutnauq {
316 316
     iniset_rpc_backend neutron $NEUTRON_CONF
317 317
 
318 318
     # goes before q-svc to init Q_SERVICE_PLUGIN_CLASSES
319
-    if is_service_enabled q-lbaas; then
320
-        deprecated "Configuring q-lbaas through devstack is deprecated"
321
-        _configure_neutron_lbaas
322
-    fi
323 319
     if is_service_enabled q-metering; then
324 320
         _configure_neutron_metering
325 321
     fi
... ...
@@ -418,10 +404,6 @@ function install_mutnauq {
418 418
 
419 419
     git_clone $NEUTRON_REPO $NEUTRON_DIR $NEUTRON_BRANCH
420 420
     setup_develop $NEUTRON_DIR
421
-    if is_service_enabled q-lbaas; then
422
-        git_clone $NEUTRON_LBAAS_REPO $NEUTRON_LBAAS_DIR $NEUTRON_LBAAS_BRANCH
423
-        setup_develop $NEUTRON_LBAAS_DIR
424
-    fi
425 421
 
426 422
     if [ "$VIRT_DRIVER" == 'xenserver' ]; then
427 423
         local dom0_ip
... ...
@@ -452,10 +434,6 @@ function install_neutron_agent_packages {
452 452
     if is_service_enabled q-agt q-dhcp q-l3; then
453 453
         neutron_plugin_install_agent_packages
454 454
     fi
455
-
456
-    if is_service_enabled q-lbaas; then
457
-        neutron_agent_lbaas_install_agent_packages
458
-    fi
459 455
 }
460 456
 
461 457
 # Start running processes, including screen
... ...
@@ -516,7 +494,6 @@ function start_mutnauq_other_agents {
516 516
     fi
517 517
 
518 518
     run_process q-meta "$AGENT_META_BINARY --config-file $NEUTRON_CONF --config-file $Q_META_CONF_FILE"
519
-    run_process q-lbaas "$AGENT_LBAAS_BINARY --config-file $NEUTRON_CONF --config-file $LBAAS_AGENT_CONF_FILENAME"
520 519
     run_process q-metering "$AGENT_METERING_BINARY --config-file $NEUTRON_CONF --config-file $METERING_AGENT_CONF_FILENAME"
521 520
 
522 521
     if [ "$VIRT_DRIVER" = 'xenserver' ]; then
... ...
@@ -556,9 +533,6 @@ function stop_mutnauq_other {
556 556
         stop_process q-meta
557 557
     fi
558 558
 
559
-    if is_service_enabled q-lbaas; then
560
-        neutron_lbaas_stop
561
-    fi
562 559
     if is_service_enabled q-metering; then
563 560
         neutron_metering_stop
564 561
     fi
... ...
@@ -662,7 +636,7 @@ function cleanup_mutnauq {
662 662
     fi
663 663
 
664 664
     # delete all namespaces created by neutron
665
-    for ns in $(sudo ip netns list | grep -o -E '(qdhcp|qrouter|qlbaas|fip|snat)-[0-9a-f-]*'); do
665
+    for ns in $(sudo ip netns list | grep -o -E '(qdhcp|qrouter|fip|snat)-[0-9a-f-]*'); do
666 666
         sudo ip netns delete ${ns}
667 667
     done
668 668
 }
... ...
@@ -818,18 +792,6 @@ function _configure_neutron_ceilometer_notifications {
818 818
     iniset $NEUTRON_CONF oslo_messaging_notifications driver messaging
819 819
 }
820 820
 
821
-function _configure_neutron_lbaas {
822
-    # Uses oslo config generator to generate LBaaS sample configuration files
823
-    (cd $NEUTRON_LBAAS_DIR && exec ./tools/generate_config_file_samples.sh)
824
-
825
-    if [ -f $NEUTRON_LBAAS_DIR/etc/neutron_lbaas.conf.sample ]; then
826
-        cp $NEUTRON_LBAAS_DIR/etc/neutron_lbaas.conf.sample $NEUTRON_CONF_DIR/neutron_lbaas.conf
827
-        iniset $NEUTRON_CONF_DIR/neutron_lbaas.conf service_providers service_provider $DEFAULT_LB_PROVIDER
828
-    fi
829
-    neutron_agent_lbaas_configure_common
830
-    neutron_agent_lbaas_configure_agent
831
-}
832
-
833 821
 function _configure_neutron_metering {
834 822
     neutron_agent_metering_configure_common
835 823
     neutron_agent_metering_configure_agent
836 824
deleted file mode 100644
... ...
@@ -1,51 +0,0 @@
1
-#!/bin/bash
2
-
3
-# Neutron loadbalancer plugin
4
-# ---------------------------
5
-
6
-# Save trace setting
7
-_XTRACE_NEUTRON_LB=$(set +o | grep xtrace)
8
-set +o xtrace
9
-
10
-
11
-AGENT_LBAAS_BINARY="$NEUTRON_BIN_DIR/neutron-lbaas-agent"
12
-LBAAS_PLUGIN=neutron_lbaas.services.loadbalancer.plugin.LoadBalancerPlugin
13
-
14
-function neutron_agent_lbaas_install_agent_packages {
15
-    if is_ubuntu || is_fedora || is_suse; then
16
-        install_package haproxy
17
-    fi
18
-}
19
-
20
-function neutron_agent_lbaas_configure_common {
21
-    _neutron_service_plugin_class_add $LBAAS_PLUGIN
22
-    _neutron_deploy_rootwrap_filters $NEUTRON_LBAAS_DIR
23
-}
24
-
25
-function neutron_agent_lbaas_configure_agent {
26
-    LBAAS_AGENT_CONF_PATH=/etc/neutron/services/loadbalancer/haproxy
27
-    mkdir -p $LBAAS_AGENT_CONF_PATH
28
-
29
-    LBAAS_AGENT_CONF_FILENAME="$LBAAS_AGENT_CONF_PATH/lbaas_agent.ini"
30
-
31
-    cp $NEUTRON_LBAAS_DIR/etc/lbaas_agent.ini.sample $LBAAS_AGENT_CONF_FILENAME
32
-
33
-    # ovs_use_veth needs to be set before the plugin configuration
34
-    # occurs to allow plugins to override the setting.
35
-    iniset $LBAAS_AGENT_CONF_FILENAME DEFAULT ovs_use_veth $Q_OVS_USE_VETH
36
-
37
-    neutron_plugin_setup_interface_driver $LBAAS_AGENT_CONF_FILENAME
38
-
39
-    if is_fedora; then
40
-        iniset $LBAAS_AGENT_CONF_FILENAME DEFAULT user_group "nobody"
41
-        iniset $LBAAS_AGENT_CONF_FILENAME haproxy user_group "nobody"
42
-    fi
43
-}
44
-
45
-function neutron_lbaas_stop {
46
-    pids=$(ps aux | awk '/haproxy/ { print $2 }')
47
-    [ ! -z "$pids" ] && sudo kill $pids || true
48
-}
49
-
50
-# Restore xtrace
51
-$_XTRACE_NEUTRON_LB
... ...
@@ -266,10 +266,6 @@ NEUTRON_BRANCH=${NEUTRON_BRANCH:-master}
266 266
 NEUTRON_FWAAS_REPO=${NEUTRON_FWAAS_REPO:-${GIT_BASE}/openstack/neutron-fwaas.git}
267 267
 NEUTRON_FWAAS_BRANCH=${NEUTRON_FWAAS_BRANCH:-master}
268 268
 
269
-# neutron lbaas service
270
-NEUTRON_LBAAS_REPO=${NEUTRON_LBAAS_REPO:-${GIT_BASE}/openstack/neutron-lbaas.git}
271
-NEUTRON_LBAAS_BRANCH=${NEUTRON_LBAAS_BRANCH:-master}
272
-
273 269
 # compute service
274 270
 NOVA_REPO=${NOVA_REPO:-${GIT_BASE}/openstack/nova.git}
275 271
 NOVA_BRANCH=${NOVA_BRANCH:-master}