Bug 92032 - /etc/init.d/named's stop() function doesn't call /usr/sbin/rndc
/etc/init.d/named's stop() function doesn't call /usr/sbin/rndc
Product: Red Hat Linux
Classification: Retired
Component: bind (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2003-05-31 20:34 EDT by Need Real Name
Modified: 2007-04-18 12:54 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-06-12 15:47:42 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2003-05-31 20:34:47 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.

To fix:
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, dkennedy@pdghightower.com.
Comment 1 Need Real Name 2003-05-31 20:38:10 EDT
Sorry about the poor formatting, I assumed the webform would handle wrapping the lines. - Don
Comment 2 Need Real Name 2003-06-01 11:04:38 EDT
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 (dkennedy@pdghightower.com)
Comment 3 Daniel Walsh 2003-06-05 14:26:27 EDT
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?

Comment 4 Need Real Name 2003-06-06 12:00:20 EDT
Hi, Dan; the following is from the Red Hat 7.3 bind-9.2.1-1.7x.2's /etc/init.d/named:

stop() {
        # Stop daemons.
        echo -n $"Stopping $prog: "
        killproc named
        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/named
        return $RETVAL

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.

- Don
Comment 5 Daniel Walsh 2003-06-06 13:56:26 EDT
Ok have you tried to update the bind implimentation to the latest on RawHide?

Comment 6 Need Real Name 2003-06-10 12:46:39 EDT
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.
Comment 7 Daniel Walsh 2003-06-12 15:47:42 EDT
Ok I am going to close this since it is fixed in the latest version.

Note You need to log in before you can comment on or make changes to this bug.