Allow dnsmasq configuration to be overriden

With the current state, someone wanting to overrde the dnsmasq
configuration, could think that defining overrides would work.
However, there is no section headers for dnsmsasq and templating with
config_template never worked. We can use what's already included in
the template, and rely on the template module instead.

Change-Id: Icf6cf1c7b7feee893fd311403a284ae512011a2e
Closes-Bug: #1697981
This commit is contained in:
Jean-Philippe Evrard 2017-10-16 13:17:06 +00:00 committed by Jean-Philippe Evrard
parent c4eb683c55
commit 00233fe6c3
3 changed files with 9 additions and 6 deletions

View File

@ -90,6 +90,14 @@ neutron_dns_domain: "openstacklocal."
# neutron_api_threads in templates/dhcp_agent.ini.j2 for num_sync_threads.
# neutron_num_sync_threads: 4
###
### DNSMasq configuration
###
# Dnsmasq doesn't work with config_template override, a deployer
# should instead configure its own neutron_dhcp_config key/values
neutron_dhcp_config:
log-facility: "/var/log/neutron/neutron-dnsmasq.log"
###
### Tunable Overrides (Sorted alphabetically)
###
@ -107,7 +115,6 @@ neutron_calico_felix_ini_overrides: {}
neutron_calico_felix_init_overrides: {}
neutron_dhcp_agent_ini_overrides: {}
neutron_dhcp_agent_init_overrides: {}
neutron_dnsmasq_neutron_conf_overrides: {}
neutron_dragonflow_controller_agent_init_overrides: {}
neutron_dragonflow_ini_overrides: {}
neutron_dragonflow_l3_agent_init_overrides: {}

View File

@ -58,14 +58,12 @@
with_items: "{{ neutron_plugin_types }}"
- name: Generate neutron dnsmasq Config
config_template:
template:
src: "dnsmasq-neutron.conf.j2"
dest: "{{ neutron_conf_dir }}/dnsmasq-neutron.conf"
owner: "root"
group: "{{ neutron_system_group_name }}"
mode: "0640"
config_overrides: "{{ neutron_dnsmasq_neutron_conf_overrides }}"
config_type: "ini"
notify:
- Restart neutron services
when:

View File

@ -258,8 +258,6 @@ neutron_l3: "{% if 'router' in neutron_plugin_base or 'neutron.services.l3_route
###
neutron_dhcp: "{% if neutron_plugin_type.split('.')[0] == 'ml2' %}True{% else %}False{% endif %}"
neutron_dhcp_config:
log-facility: "/var/log/neutron/neutron-dnsmasq.log"
###
### Metadata Agent Plugin Configuration