From 44150511780d6619e4b11a702d787224fb11ea1d Mon Sep 17 00:00:00 2001 From: Mohammed Naser Date: Sun, 23 Sep 2018 15:39:54 -0400 Subject: [PATCH] Disable neutron-vpnaas-agent The Neutron VPNaaS agent has been dropped in the Queens release and replaced by a plugin in L3 agent[1]. [1]: https://docs.openstack.org/releasenotes/neutron-vpnaas/queens.html Change-Id: Idb171b3a242483fc2bb9cf837c815a6fb6d3a0de --- templates/l3_agent.ini.j2 | 31 +++++++++++++++++++++---------- templates/vpnaas_agent.ini.j2 | 9 --------- vars/main.yml | 6 +++++- 3 files changed, 26 insertions(+), 20 deletions(-) delete mode 100644 templates/vpnaas_agent.ini.j2 diff --git a/templates/l3_agent.ini.j2 b/templates/l3_agent.ini.j2 index f8897309..d10df423 100644 --- a/templates/l3_agent.ini.j2 +++ b/templates/l3_agent.ini.j2 @@ -21,24 +21,35 @@ ha_vrrp_auth_type = {{ neutron_ha_vrrp_auth_type }} # Metadata enable_metadata_proxy = True -{% if neutron_fwaas | bool %} +# L3 plugins +{% set l3_agent_plugins = [] %} +{% if neutron_fwaas | bool %} +# FWaaS +{% set _ = l3_agent_plugins.append("fwaas") %} [fwaas] enabled = true driver = iptables agent_version = v1 +{% endif %} -[AGENT] -extensions = fwaas - -{% elif neutron_fwaas_v2 | bool %} - +{% if neutron_fwaas_v2 | bool %} +# FWaaS v2 +{% set _ = l3_agent_plugins.append("fwaas_v2") %} [fwaas] enabled = true driver = iptables_v2 agent_version = v2 - -[AGENT] -extensions = fwaas_v2 - +{% endif %} + +{% if neutron_vpnaas | bool %} +# VPNaaS +{% set _ = l3_agent_plugins.append("vpnaas") %} +[vpnagent] +vpn_device_driver = {{ neutron_driver_vpnaas }} +{% endif %} + +{% if l3_agent_plugins|length > 1 %} +[AGENT] +extensions = {{ l3_agent_plugins | join(',') }} {% endif %} diff --git a/templates/vpnaas_agent.ini.j2 b/templates/vpnaas_agent.ini.j2 deleted file mode 100644 index 31d8dfbe..00000000 --- a/templates/vpnaas_agent.ini.j2 +++ /dev/null @@ -1,9 +0,0 @@ -# {{ ansible_managed }} - -[DEFAULT] -external_network_bridge = {{ neutron_external_network_bridge }} - -interface_driver = {{ neutron_plugins[neutron_plugin_type].driver_interface }} - -[vpnagent] -vpn_device_driver = {{ neutron_driver_vpnaas }} diff --git a/vars/main.yml b/vars/main.yml index 4dbf4f51..1dace238 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -447,10 +447,14 @@ neutron_services: config_type: "ini" init_config_overrides: "{{ neutron_bgp_dragent_init_overrides }}" start_order: 3 + # TODO(mnaser): neutron-vpnaas-agent binary was dropped in Queens + # and replaced by a plugin to neutron-l3-agent. We missed + # this in Queens, so let's remove this in T to disable + # the service. neutron-vpnaas-agent: group: neutron_l3_agent service_name: neutron-vpn-agent - service_en: "{{ neutron_vpnaas | bool }}" + service_en: false service_conf_path: "{{ neutron_conf_dir }}" service_conf: vpnaas_agent.ini service_rootwrap: rootwrap.d/vpnaas.filters