Includes two enhancements to support VPNaaS and allow other
vendor implementation support. Goal is to provide a solution
for VPN .ini files until a more general solution can be defined
to handle all reference and vendor .ini files.
First, the /opt/stack/neutron/etc/vpn_agent.ini file is copied
to /etc/neutron, to allow the selected device drivers for agent
to be specified. Both reference and vendor implementations can
be uncommented in this file, prior to stacking.
Second, to allow vendor VPN implementations to provide an .ini
file to the agent at start-up time, an environment variable is
defined and can be set in the localrc to specify one or more
.ini files. The desire is NOT to include vendor settings in the
global vpn_agent.ini.
Change-Id: Ia8250db660216a5296cb6ba2af1538b8c90d187c
Closes-Bug: 1301552
| ... | ... |
@@ -127,6 +127,10 @@ Q_L3_ROUTER_PER_TENANT=${Q_L3_ROUTER_PER_TENANT:-False}
|
| 127 | 127 |
# See _configure_neutron_common() for details about setting it up |
| 128 | 128 |
declare -a Q_PLUGIN_EXTRA_CONF_FILES |
| 129 | 129 |
|
| 130 |
+# List of (optional) config files for VPN device drivers to use with |
|
| 131 |
+# the neutron-q-vpn agent |
|
| 132 |
+declare -a Q_VPN_EXTRA_CONF_FILES |
|
| 133 |
+ |
|
| 130 | 134 |
|
| 131 | 135 |
Q_RR_CONF_FILE=$NEUTRON_CONF_DIR/rootwrap.conf |
| 132 | 136 |
if [[ "$Q_USE_ROOTWRAP" == "False" ]]; then |
| ... | ... |
@@ -495,7 +499,7 @@ function start_neutron_agents {
|
| 495 | 495 |
L3_CONF_FILES="$L3_CONF_FILES --config-file $Q_FWAAS_CONF_FILE" |
| 496 | 496 |
fi |
| 497 | 497 |
if is_service_enabled q-vpn; then |
| 498 |
- screen_it q-vpn "cd $NEUTRON_DIR && $AGENT_VPN_BINARY $L3_CONF_FILES" |
|
| 498 |
+ screen_it q-vpn "cd $NEUTRON_DIR && $AGENT_VPN_BINARY $VPN_CONF_FILES" |
|
| 499 | 499 |
else |
| 500 | 500 |
screen_it q-l3 "cd $NEUTRON_DIR && python $AGENT_L3_BINARY $L3_CONF_FILES" |
| 501 | 501 |
fi |
| ... | ... |
@@ -658,6 +662,7 @@ function _configure_neutron_dhcp_agent {
|
| 658 | 658 |
} |
| 659 | 659 |
|
| 660 | 660 |
function _configure_neutron_l3_agent {
|
| 661 |
+ local cfg_file |
|
| 661 | 662 |
Q_L3_ENABLED=True |
| 662 | 663 |
# for l3-agent, only use per tenant router if we have namespaces |
| 663 | 664 |
Q_L3_ROUTER_PER_TENANT=$Q_USE_NAMESPACE |
| ... | ... |
@@ -669,6 +674,15 @@ function _configure_neutron_l3_agent {
|
| 669 | 669 |
Q_FWAAS_CONF_FILE=$NEUTRON_CONF_DIR/fwaas_driver.ini |
| 670 | 670 |
fi |
| 671 | 671 |
|
| 672 |
+ if is_service_enabled q-vpn; then |
|
| 673 |
+ Q_VPN_CONF_FILE=$NEUTRON_CONF_DIR/vpn_agent.ini |
|
| 674 |
+ cp $NEUTRON_DIR/etc/vpn_agent.ini $Q_VPN_CONF_FILE |
|
| 675 |
+ VPN_CONF_FILES="--config-file $NEUTRON_CONF --config-file=$Q_L3_CONF_FILE --config-file=$Q_VPN_CONF_FILE" |
|
| 676 |
+ for cfg_file in ${Q_VPN_EXTRA_CONF_FILES[@]}; do
|
|
| 677 |
+ VPN_CONF_FILES+=" --config-file $cfg_file" |
|
| 678 |
+ done |
|
| 679 |
+ fi |
|
| 680 |
+ |
|
| 672 | 681 |
cp $NEUTRON_DIR/etc/l3_agent.ini $Q_L3_CONF_FILE |
| 673 | 682 |
|
| 674 | 683 |
iniset $Q_L3_CONF_FILE DEFAULT verbose True |