Remove service_providers in vpnaas_agent.ini

Service_providers config group is already configured in the neutron_vpnaas.conf.
So, we only need to load the neutron_vpnaas.conf configuration file
when the neutron_vpnaas_agent container starts, without having
to duplicate the configuration.

Change-Id: I7b78831325db4bbb263b2cc174e848ea7037ad0a
This commit is contained in:
shaofeng_cheng 2017-08-13 10:36:54 +08:00
parent 64b3716e61
commit 9ea1b06bfa
5 changed files with 21 additions and 10 deletions

View File

@ -6,6 +6,7 @@
config_json: "{{ neutron_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
neutron_conf: "{{ neutron_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
neutron_lbaas_conf: "{{ neutron_lbaas_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
neutron_vpnaas_conf: "{{ neutron_vpnaas_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
neutron_ml2_conf: "{{ neutron_ml2_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_json: "{{ policy_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
neutron_server_container: "{{ check_neutron_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
@ -223,6 +224,7 @@
service: "{{ neutron_services[service_name] }}"
config_json: "{{ neutron_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
neutron_conf: "{{ neutron_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
neutron_vpnaas_conf: "{{ neutron_vpnaas_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
neutron_l3_agent_ini: "{{ neutron_l3_agent_inis.results|selectattr('item.key', 'equalto', service_name)|first }}"
neutron_fwaas_driver_ini: "{{ neutron_fwaas_driver_inis.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_json: "{{ policy_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
@ -240,6 +242,7 @@
- service.host_in_groups | bool
- config_json | changed
or neutron_conf | changed
or neutron_vpnaas_conf | changed
or neutron_l3_agent_ini | changed
or neutron_fwaas_driver_ini | changed
or neutron_vpnaas_agent_ini | changed

View File

@ -90,20 +90,24 @@
- name: Copying over neutron_vpnaas.conf
vars:
service_name: "neutron-server"
neutron_server: "{{ neutron_services[service_name] }}"
service_name: "{{ item.key }}"
services_need_neutron_vpnaas_conf:
- "neutron-server"
- "neutron-vpnaas-agent"
merge_configs:
sources:
- "{{ role_path }}/templates/neutron_vpnaas.conf.j2"
- "{{ node_custom_config }}/neutron/neutron_vpnaas.conf"
- "{{ node_custom_config }}/neutron/{{ inventory_hostname }}/neutron_vpnaas.conf"
dest: "{{ node_config_directory }}/{{ service_name }}/neutron_vpnaas.conf"
register: neutron_vpnaas_conf
dest: "{{ node_config_directory }}/{{ item.key }}/neutron_vpnaas.conf"
register: neutron_vpnaas_confs
when:
- neutron_server.enabled | bool
- neutron_server.host_in_groups | bool
- item.value.enabled | bool
- item.value.host_in_groups | bool
- item.key in services_need_neutron_vpnaas_conf
with_dict: "{{ neutron_services }}"
notify:
- "Restart {{ service_name }} container"
- "Restart {{ item.key }} container"
- name: Copying over ml2_conf.ini
vars:

View File

@ -11,6 +11,7 @@ neutron-netns-cleanup \
neutron-vpn-agent \
--config-file /etc/neutron/neutron.conf \
--config-file /etc/neutron/neutron_vpnaas.conf \
--config-file /etc/neutron/fwaas_driver.ini \
--config-file /etc/neutron/l3_agent.ini \
--config-file /etc/neutron/vpnaas_agent.ini

View File

@ -13,6 +13,12 @@
"owner": "neutron",
"perm": "0600"
},
{
"source": "{{ container_config_directory }}/neutron_vpnaas.conf",
"dest": "/etc/neutron/neutron_vpnaas.conf",
"owner": "neutron",
"perm": "0600"
},
{
"source": "{{ container_config_directory }}/fwaas_driver.ini",
"dest": "/etc/neutron/fwaas_driver.ini",

View File

@ -4,8 +4,5 @@
[ipsec]
enable_detailed_logging = {{ neutron_logging_debug }}
[service_providers]
service_provider = VPN:openswan:neutron_vpnaas.services.vpn.service_drivers.ipsec.IPsecVPNDriver:default
[vpnagent]
vpn_device_driver = {{ vpn_device_driver }}