From 00233fe6c385783f154f3c18c1d435c959b22952 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Evrard Date: Mon, 16 Oct 2017 13:17:06 +0000 Subject: [PATCH] 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 --- defaults/main.yml | 9 ++++++++- tasks/neutron_post_install.yml | 4 +--- vars/main.yml | 2 -- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 4dd6975f..ea8aab9c 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -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: {} diff --git a/tasks/neutron_post_install.yml b/tasks/neutron_post_install.yml index f82a9bf5..bb9aa110 100644 --- a/tasks/neutron_post_install.yml +++ b/tasks/neutron_post_install.yml @@ -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: diff --git a/vars/main.yml b/vars/main.yml index 7b09a8f0..1380dd63 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -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