Bug 46464 - /etc/rc.d/init.d/ntpd chkconfig line starts too early
/etc/rc.d/init.d/ntpd chkconfig line starts too early
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: ntp (Show other bugs)
7.1
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Harald Hoyer
Brian Brock
:
: 44580 66161 72128 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-06-28 17:49 EDT by Need Real Name
Modified: 2007-04-18 12:34 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-10-13 12:02:11 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2001-06-28 17:49:55 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.77 [en] (X11; U; Linux 2.4.5 i686)

Description of problem:
/etc/rc.d/init.d/ntpd chkconfig line start level = 26 too early, before
named = 55 if using 'ntpdate' to pre-adjust clock. Since it is legal to use
dns names for servers listed in /etc/ntp/step-tickers, startup should be
delayed until after named.

How reproducible:
Always

Steps to Reproduce:
1. Enter hostname NOT in /etc/hosts of a ntp server in
/etc/ntp/step-tickers (create file if needed)
2. as root: kill named
3. as root: execute /etc/rc.d/init.d/ntpd start
check /var/log/messages for host lookup error & ntpdate failure
	

Actual Results:  Jun 27 19:38:09 thalia ntpdate[472]: can't find host
ntp.visi.com
Jun 27 19:38:09 thalia ntpdate[472]: no servers can be used, exiting

Initial time synch fails causing some difficulty when ntp tries to make up
for possible large time differences between local clock and remote server.

Expected Results:  Jun 27 20:05:02 thalia ntpdate[893]: step time server
209.98.200.89 offset -0.000024 sec


Additional info:
Comment 1 Pekka Savola 2001-07-19 08:37:24 EDT
*** Bug 44580 has been marked as a duplicate of this bug. ***
Comment 2 Harald Hoyer 2001-12-14 08:28:10 EST
should be fixed in ntp-4.1.0b-1
Comment 3 Blair Zajac 2001-12-15 17:25:32 EST
The solution I use for this is this:

1) Create two /etc/resolv.conf files, I call them /etc/resolv.conf_local_down and /etc/resolv.conf_local_up.
The only difference between them is that one /etc/resolv.conf_local_up uses 127.0.0.1 as a name server
and /etc/resolv.conf_local_down uses a nearby public name server.
2) Edit /etc/rc.d/init.d/named to move the proper /etc/resolv_conf.XXX to /etc/resolv.conf when the name
server is started or stopped.  Here's the diff to /etc/rc.d/init.d/named from bind-9.2.0-1

--- named.FCS   Mon Nov 26 15:32:40 2001
+++ named       Sat Dec  1 11:26:32 2001
@@ -49,6 +49,7 @@
                RETVAL=1
        fi
        [ $RETVAL -ne 0 ] && failure $"$base startup"
+       [ $RETVAL -eq 0 ] && cat /etc/resolv.conf_local_up > /etc/resolv.conf
        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/named && success $"$base startup"
        echo
        return $RETVAL
@@ -56,6 +57,7 @@
 stop() {
         # Stop daemons.
         echo -n $"Stopping $prog: "
+       cat /etc/resolv.conf_local_down > /etc/resolv.conf
         killproc named
        RETVAL=$?
        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/named

Blair
Comment 4 Harald Hoyer 2002-06-11 10:06:35 EDT
*** Bug 66161 has been marked as a duplicate of this bug. ***
Comment 5 Harald Hoyer 2002-08-21 07:53:40 EDT
*** Bug 72128 has been marked as a duplicate of this bug. ***
Comment 6 Brian Brock 2003-10-13 12:02:11 EDT
fix verified.

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