Browse code

Devstack support for Neutron VPNaaS

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: I5370ee57bbe326eff505a53055da4fddc0838de4
Closes-Bug: 1301552

Paul Michali authored on 2014/04/03 04:12:22
Showing 1 changed files
... ...
@@ -495,7 +495,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 +658,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 +670,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