Skip to content

Commit

Permalink
Switch to dhcp-hostsfile
Browse files Browse the repository at this point in the history
We hit a race condition with ansible creating the DHCP file with strict
rights, ionitofy kicking in, dnsmasq trying to read the file and
failing.
This prevented the service to load a DHCP host configuration, leading to
issues.

With this change, we ensure we keep a directory, but we have to trigger
the reload ourself - like before. This ensures the rights are all
applied.
  • Loading branch information
cjeanner authored and openshift-merge-bot[bot] committed Jun 20, 2024
1 parent 8e61483 commit 16e7339
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions roles/dnsmasq/tasks/manage_host.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@

- name: Manage host entry - add
become: true
notify: Reload dnsmasq
when:
- cifmw_dnsmasq_host_state == 'present'
ansible.builtin.copy:
Expand Down
2 changes: 1 addition & 1 deletion roles/dnsmasq/templates/cifmw-dnsmasq.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ dhcp-leasefile=/var/lib/dnsmasq/cifmw-dnsmasq.leases
{% endif %}

conf-dir={{ cifmw_dnsmasq_basedir }},*.conf
dhcp-hostsdir="{{ cifmw_dnsmasq_basedir }}/dhcp-hosts.d"
dhcp-hostsfile="{{ cifmw_dnsmasq_basedir }}/dhcp-hosts.d"

0 comments on commit 16e7339

Please sign in to comment.