Red Hat Bugzilla – Bug 92032
/etc/init.d/named's stop() function doesn't call /usr/sbin/rndc
Last modified: 2007-04-18 12:54:11 EDT
Description of problem: BIND 9.2.1 uses journal files to record dynamic changes to its DNS zones. These files are flushed to their respective zone files at shutdown when the /usr/sbin/rndc utility is used with the "stop" argument. If named is shut down with a simple kill command, such as the one used by the killproc() function called by the stop() function in /etc/init.d/named, then the journal files aren't flushed to the zone files. At the next startup of named, it complains that some of the journals are out of sync with their respective zones. Manual corrective action is required at this point to resync the files. Note that the rhstatus() function in /etc/init.d/named does use rndc.
Version-Release number of selected component (if applicable): bind-9.2.1-1.7x.2
How reproducible: Almost always; depends on whether /var/named/*.jnl files exist or not.
Steps to Reproduce:
1. Operate named in a network where dynamic DNS updates occur such that .jnl files are created in /var/named/.
2. As root, invoke /etc/init.d/named stop.
3. As root, invoke /etc/init.d/named start.
4. Examine /var/log/messages; see that the stop did not result in the message "shutting down: flushing changes" as part of the shutdown messages. See that the startup had problems due to some of the journal files being out of sync with their zones.
1. Shut down named via "rndc stop". Note the appearance of the "shutting down: flushing changes" message in /var/log/messages.
2. Delete /var/named/*.jnl.
3. Start named via "/etc/init.d/named start". Note that all zones are initialized correctly.
Actual results: When shutdown with /etc/init.d/named, named reported "journal rollforward failed: journal out of sync with zone" for two of the zones.
Expected results: The message "shutting down: flushing changes" should have been logged during named's shutdown, and at restart, all the zones should have messages such as "zone p-d-g.com/IN: loaded serial 2003042794".
Additional info: This report was submitted by Don Kennedy, email@example.com.
Sorry about the poor formatting, I assumed the webform would handle wrapping the lines. - Don
We've been using Webmin 1.080 to manage BIND 9. I'm also checking into the idea
that Webmin may not be properly updating the various /var/named files given the
way BIND 9 journalling works with dynamic DNS and slave zone transfers.
Webmin's BIND control module uses /etc/init.d/named to stop named, so there may
be a couple of things interacting in the situation I'm seeing.
- Don (firstname.lastname@example.org)
The named script uses rndc to stop the named process. If this fails it uses
killproc. Is there a change rndc is returning an error?
Hi, Dan; the following is from the Red Hat 7.3 bind-9.2.1-1.7x.2's /etc/init.d/named:
# Stop daemons.
echo -n $"Stopping $prog: "
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/named
Your comment "The named script uses rndc to stop the named process. If this
fails it uses killproc." is valid for RH 9's bind package (we have a RH9 system here, I checked it's /etc/init.d/named file), but not for RH 7.3.
Ok have you tried to update the bind implimentation to the latest on RawHide?
No, I haven't; I don't want to put Rawhide packages on our production server.
I've done a local patch to the named file using the stop() function from RH9. That works and doesn't involve a complete bind update.
Ok I am going to close this since it is fixed in the latest version.