Browse code

Prevent spawning two VPN agents

Currently, if the VPN devstack plugin is enabled (which is
the method used for VPN in all test jobs), there will be
two VPN agent processes started. This doesn't seem to
affect the tests, but is incorrect.

To resolve this, the proposal is to do this in two steps.
With this commit, the script is modified to start the q-vpn
process, if q-vpn is enabled (legacy), and to only start
q-l3 process, if neither q-vpn nor neutron-vpnaas is enabled.

Once committed, the opertion will be the same - if no VPN
service is enabled, we get q-l3 (correct); if legacy q-vpn is
enabled (only), we get q-vpn (correct); if the plugin is used
(the default), we get two q-vpn processes started (wrong).

With a separate plugin commit (to be pushed next), the plugin
will be renamed to neutron-vpnaas, and then we'll get only
one agent process (q-vpn or neutron-vpnaas) runing. We can't
commit the plugin first, because both the VPN agent and the
q-l3 agent will be started at once (just as bad, if not worse).

Change-Id: I2bb7ac01e619c8a9b22bd517a4ff60d67035dfed
Partial-Bug: 1484141

Paul Michali authored on 2015/08/15 00:49:27
Showing 1 changed files
... ...
@@ -730,7 +730,9 @@ function start_neutron_l2_agent {
730 730
 function start_neutron_other_agents {
731 731
     run_process q-dhcp "python $AGENT_DHCP_BINARY --config-file $NEUTRON_CONF --config-file=$Q_DHCP_CONF_FILE"
732 732
 
733
-    if is_service_enabled q-vpn; then
733
+    if is_service_enabled neutron-vpnaas; then
734
+        :  # Started by plugin
735
+    elif is_service_enabled q-vpn; then
734 736
         run_process q-vpn "$AGENT_VPN_BINARY $(determine_config_files neutron-vpn-agent)"
735 737
     else
736 738
         run_process q-l3 "python $AGENT_L3_BINARY $(determine_config_files neutron-l3-agent)"