Generate the Neutron LBaaS sample config files by using the oslo
generator. The files are generated with a .sample extension and
replace the static example configuration files.
Once the generation code is delivered, the static config files
will be removed.
Change-Id: Iae1e581ec2bea9c0ced700229effcc716d53fe4e
Related-blueprint: autogen-neutron-conf-file
Partial-bug: #1199963
Depends-On: I25507f3bc6e995580aa91a912c2cf4110757df15
| ... | ... |
@@ -112,6 +112,9 @@ NEUTRON_CONF_DIR=/etc/neutron |
| 112 | 112 |
NEUTRON_CONF=$NEUTRON_CONF_DIR/neutron.conf |
| 113 | 113 |
export NEUTRON_TEST_CONFIG_FILE=${NEUTRON_TEST_CONFIG_FILE:-"$NEUTRON_CONF_DIR/debug.ini"}
|
| 114 | 114 |
|
| 115 |
+# Default provider for load balancer service |
|
| 116 |
+DEFAULT_LB_PROVIDER=LOADBALANCER:Haproxy:neutron_lbaas.services.loadbalancer.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver:default |
|
| 117 |
+ |
|
| 115 | 118 |
# Agent binaries. Note, binary paths for other agents are set in per-service |
| 116 | 119 |
# scripts in lib/neutron_plugins/services/ |
| 117 | 120 |
AGENT_DHCP_BINARY="$NEUTRON_BIN_DIR/neutron-dhcp-agent" |
| ... | ... |
@@ -1058,8 +1061,12 @@ function _configure_neutron_ceilometer_notifications {
|
| 1058 | 1058 |
} |
| 1059 | 1059 |
|
| 1060 | 1060 |
function _configure_neutron_lbaas {
|
| 1061 |
- if [ -f $NEUTRON_LBAAS_DIR/etc/neutron_lbaas.conf ]; then |
|
| 1062 |
- cp $NEUTRON_LBAAS_DIR/etc/neutron_lbaas.conf $NEUTRON_CONF_DIR |
|
| 1061 |
+ # Uses oslo config generator to generate LBaaS sample configuration files |
|
| 1062 |
+ (cd $NEUTRON_LBAAS_DIR && exec ./tools/generate_config_file_samples.sh) |
|
| 1063 |
+ |
|
| 1064 |
+ if [ -f $NEUTRON_LBAAS_DIR/etc/neutron_lbaas.conf.sample ]; then |
|
| 1065 |
+ cp $NEUTRON_LBAAS_DIR/etc/neutron_lbaas.conf.sample $NEUTRON_CONF_DIR/neutron_lbaas.conf |
|
| 1066 |
+ iniset $NEUTRON_CONF_DIR/neutron_lbaas.conf service_providers service_provider $DEFAULT_LB_PROVIDER |
|
| 1063 | 1067 |
fi |
| 1064 | 1068 |
neutron_agent_lbaas_configure_common |
| 1065 | 1069 |
neutron_agent_lbaas_configure_agent |
| ... | ... |
@@ -28,7 +28,7 @@ function neutron_agent_lbaas_configure_agent {
|
| 28 | 28 |
|
| 29 | 29 |
LBAAS_AGENT_CONF_FILENAME="$LBAAS_AGENT_CONF_PATH/lbaas_agent.ini" |
| 30 | 30 |
|
| 31 |
- cp $NEUTRON_LBAAS_DIR/etc/lbaas_agent.ini $LBAAS_AGENT_CONF_FILENAME |
|
| 31 |
+ cp $NEUTRON_LBAAS_DIR/etc/lbaas_agent.ini.sample $LBAAS_AGENT_CONF_FILENAME |
|
| 32 | 32 |
|
| 33 | 33 |
# ovs_use_veth needs to be set before the plugin configuration |
| 34 | 34 |
# occurs to allow plugins to override the setting. |