Bug 83613 - dhclient-script bug causes ntp to fail to work
dhclient-script bug causes ntp to fail to work
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: dhcp (Show other bugs)
8.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Walsh
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-02-06 05:25 EST by Martijn Feleus
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-03-04 12:02:46 EST
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 Martijn Feleus 2003-02-06 05:25:26 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.6 (X11; Linux i686; U;) Gecko/20020830

Description of problem:
A bug in the handling of ntp in the dhclient-script component of the dhclient
package (which can't be selected anywhere in bugzilla, I might add) causes the
dhcp-configured ntp servers to be ignored because of the default restrict policy.

Version-Release number of selected component (if applicable):
dhclient-3.0pl1-9, dhclient-3.0pl1-15

How reproducible:
Always

Steps to Reproduce:
1. configure dhcp to set ntp servers
2. let the client get it's info from the dhcp server
3. ntp doesn't work because the /etc/ntp.conf doesn't list the servers as
'unrestricted', so the servers are ignored.
    

Actual Results:  Time wasn't sync'ed (sp?) properly, causing confusion.

Expected Results:  NTP should have sync'ed time, of course :-)

Additional info:

patch for dhclient-script below:

--- /sbin/dhclient-script       2003-01-13 14:26:32.000000000 +0100
+++ /sbin/dhclient-script.ntp   2003-01-13 14:26:26.000000000 +0100
@@ -157,6 +157,7 @@
       :> /etc/ntp/step-tickers
       for I in $new_ntp_servers; do
          echo "server $I" >> /etc/ntp.conf
+         echo "restrict $I" >> /etc/ntp.conf
          echo "$I" >> /etc/ntp/step-tickers
       done
        fi
Comment 1 Elliot Lee 2003-02-19 17:29:12 EST
dhclient comes from the dhcp source package.
Comment 2 Martijn Feleus 2003-02-20 04:22:54 EST
Sorry, forgot to do rpm -qf /sbin/dhclient-script ;-) I learned only recently
that the selection of packages seems to be based on the source rpm, which can
generate more than one binary rpm IIRC. Hence the confusion.

I might add that the way this script sets the defaults is counter-intuitive and
IMHO contrary to unix tradition. Every configuration and default should be
defined in /etc, not hidden in a script in /sbin. Perhaps it's best to rewrite
dhclient-script to allow for this?
Comment 3 Daniel Walsh 2003-03-04 12:02:46 EST
Current release has the following code in it.  Available on Rawhide.

     :> /etc/ntp/step-tickers
      for I in $new_ntp_servers; do
          echo "restrict $I nomodify notrap noquery" >> /etc/ntp.conf
	  echo "server $I" >> /etc/ntp.conf
	  echo "$I" >> /etc/ntp/step-tickers
      done

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