Sanity check - Unbound 1.13.1 restarting on DHCP registration
-
Hi folks,
I have unbound 1.13.1 running on pfSense 2.5. No issues with overall service stability although I've noticed that when a DHCP lease or static mapping is registered, the DHCP service sends a SIGHUP to the unbound daemon, causing a service restart.If I turn off automatic registration of leases and static mappings the service restarts cease.
My assumption is that the restart is expected behaviour and needed so that unbound can reload the updated zone files into memory. My assumption could be totally incorrect too, so checking in here for the collective wisdom.
Thanks
-
Yep, you're close.
It's actually the process dhcpleases that is created when you check this option ( and this option only ) :
This process checks the 'data base' that the dhcp server maintains.
If it changes, because a new lease comes in or a lease gets changed, it makes a new /etc/hosts file with the existing leases (not timed out) and then SIGHUP unbound. At startup, unbound reads /etc/hosts.Only this option needs to be unchecked to stop unbound from being restarting .
This one does NOT restart unbound :
as the Static MAC DHCP info is written to the system wide /etc/hosts file at the boot of pfSense, and after that that list doesn't change any more - they are 'static' ***.
When unbound starts, it reads the /etc/hosts file.I advise to leave this option checked, so the host names will get used for the local DNS purposes.
*** except if the the admin changes the list with Static MAC leases, of course.
-
@gertjan thank you, that makes sense