diff --git a/lib/neutron b/lib/neutron index e6f5911cbd..835f900425 100644 --- a/lib/neutron +++ b/lib/neutron @@ -415,7 +415,12 @@ function start_neutron_agents() { # Start up the neutron agents if enabled screen_it q-agt "cd $NEUTRON_DIR && python $AGENT_BINARY --config-file $NEUTRON_CONF --config-file /$Q_PLUGIN_CONF_FILE" screen_it q-dhcp "cd $NEUTRON_DIR && python $AGENT_DHCP_BINARY --config-file $NEUTRON_CONF --config-file=$Q_DHCP_CONF_FILE" - screen_it q-l3 "cd $NEUTRON_DIR && python $AGENT_L3_BINARY --config-file $NEUTRON_CONF --config-file=$Q_L3_CONF_FILE" + + if is_service_enabled q-vpn; then + screen_it q-vpn "cd $NEUTRON_DIR && $AGENT_VPN_BINARY --config-file $NEUTRON_CONF --config-file=$Q_L3_CONF_FILE" + else + screen_it q-l3 "cd $NEUTRON_DIR && python $AGENT_L3_BINARY --config-file $NEUTRON_CONF --config-file=$Q_L3_CONF_FILE" + fi screen_it q-meta "cd $NEUTRON_DIR && python $AGENT_META_BINARY --config-file $NEUTRON_CONF --config-file=$Q_META_CONF_FILE" if [ "$VIRT_DRIVER" = 'xenserver' ]; then @@ -585,7 +590,6 @@ function _configure_neutron_vpn() { neutron_vpn_install_agent_packages neutron_vpn_configure_common - neutron_vpn_configure_agent } # _configure_neutron_plugin_agent() - Set config files for neutron plugin agent diff --git a/lib/neutron_plugins/services/vpn b/lib/neutron_plugins/services/vpn index 3c030c5f42..0a79a697ad 100644 --- a/lib/neutron_plugins/services/vpn +++ b/lib/neutron_plugins/services/vpn @@ -6,7 +6,7 @@ MY_XTRACE=$(set +o | grep xtrace) set +o xtrace -VPN_BINARY="$NEUTRON_DIR/bin/neutron-vpn-agent" +AGENT_VPN_BINARY="$NEUTRON_BIN_DIR/neutron-vpn-agent" VPN_PLUGIN="neutron.services.vpn.plugin.VPNDriverPlugin" function neutron_vpn_install_agent_packages() { @@ -21,9 +21,5 @@ function neutron_vpn_configure_common() { fi } -function neutron_vpn_configure_agent() { - AGENT_L3_BINARY="$NEUTRON_DIR/bin/neutron-vpn-agent" -} - # Restore xtrace $MY_XTRACE