Bug 13214 - samba_dlz shuts down when bind 'reloads'
samba_dlz shuts down when bind 'reloads'
Status: NEW
Product: Samba 4.1 and newer
Classification: Unclassified
Component: AD: LDB/DSDB/SAMDB
4.7.4
Other Linux
: P5 normal
: ---
Assigned To: Andrew Bartlett
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-01-12 10:01 UTC by Kristján Jónsson
Modified: 2018-01-17 14:40 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kristján Jónsson 2018-01-12 10:01:30 UTC
I have Two RPi3 machines running CentOS 7 as ADDC.  They also serve DHCP requests and do dynamic updates via the methods described in the wiki, using a dhcp-dyndns.sh script called by dhcpd.

The default logrotate scripts for named (BIND 9.9.4-RedHat-9.9.4-51.el7_4.1 (Extended Support Version)) call "sysctl reload named.service"
This sends a SIGHUP to named.  Unfortunately the reload handling by bind causes samba_dlz to shut down.  This is the log of this event (this can also be triggered using 'rndc reload'

This causes a flurry of successful activity, the logs ending with:
Jan 12 09:58:17 dc02.rvx.is named[8331]: zone _msdcs.rvx.is/NONE: (other) removed
Jan 12 09:58:17 dc02.rvx.is named[8331]: reloading configuration succeeded
Jan 12 09:58:17 dc02.rvx.is named[8331]: samba_dlz: shutting down
Jan 12 09:58:17 dc02.rvx.is named[8331]: reloading zones succeeded
Jan 12 09:58:17 dc02.rvx.is named[8331]: all zones loaded
Jan 12 09:58:17 dc02.rvx.is named[8331]: running

In this state, named will refuse dynamic dhcp updates.
To fix it, named needs to be restarted with 'systemctl restart named.service'

The end of the 'restart' log looks like:
Jan 12 10:00:18 dc02.rvx.is named[27159]: samba_dlz: configured writeable zone '_msdcs.rvx.is'
Jan 12 10:00:18 dc02.rvx.is named[27159]: set up managed keys zone for view _default, file '/var/named/dynamic/managed-keys.bind'
Jan 12 10:00:18 dc02.rvx.is named[27159]: command channel listening on 127.0.0.1#953
Jan 12 10:00:18 dc02.rvx.is named[27159]: managed-keys-zone: journal file is out of date: removing journal file
Jan 12 10:00:18 dc02.rvx.is named[27159]: managed-keys-zone: loaded serial 53
Jan 12 10:00:18 dc02.rvx.is named[27159]: zone 1.0.0.127.in-addr.arpa/IN: loaded serial 0
Jan 12 10:00:18 dc02.rvx.is named[27159]: zone 0.in-addr.arpa/IN: loaded serial 0
Jan 12 10:00:18 dc02.rvx.is named[27159]: zone localhost.localdomain/IN: loaded serial 0
Jan 12 10:00:18 dc02.rvx.is named[27159]: zone localhost/IN: loaded serial 0
Jan 12 10:00:18 dc02.rvx.is named[27159]: zone 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: loaded serial 0
Jan 12 10:00:18 dc02.rvx.is named[27159]: all zones loaded
Jan 12 10:00:18 dc02.rvx.is named[27159]: running

A workaround on these systems is to change /etc/logrotate.d/named to do a "restart" rather than "reload".  But ideally, samba_dlz should cope with reloading of named.
Comment 1 Kristján Jónsson 2018-01-17 14:38:48 UTC
I've filed a bug with the BIND team, https://www.isc.org/community/report-bug/
it is referred to as '[ISC-Bugs #47014]'
Comment 2 Kristján Jónsson 2018-01-17 14:40:10 UTC
(My investingation doesn't indicate that there is any special handling to be done by a dlz.so module on reload.  It is therefore likely that the BIND daemon is erroneously shutting down the module without restarting it when it "reloads".