Bug 170778 - dhclient-script problems found & fixed
dhclient-script problems found & fixed
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: dhcp (Show other bugs)
3.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jiri Popelka
:
Depends On: 144417
Blocks: 190430
  Show dependency treegraph
 
Reported: 2005-10-14 11:10 EDT by Jason Vas Dias
Modified: 2010-04-06 08:51 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-04-06 08:51:21 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 Jason Vas Dias 2005-10-14 11:10:54 EDT
+++ This bug was initially created as a clone of Bug #144417 +++

Description of problem:

During DHCP testing, these problems with dhclient script were
found and fixed:

1. Interface & resolv.conf configured and services restarted
   in wrong order
  
   Before, when a new lease is to be configured, dhclient-script 
   potentially restarted the ntpd and ypbind services BEFORE the
   new interface and resolv.conf were configured, leading to long
   timeouts for these services .  

   Now, dhclient-script will follow this order when a new lease
   is being configured:
  
   1. (re-)Configure the interface and routes
   2. configure resolv.conf
   3. potentially restart ntpd and ypbind
  
   (It used to follow the REVERSE of this order).

2. Files that were reconfigured by DHCP when an new lease is 
   configured (ifup) were not restored to previous versions 
   when the lease is relinquished (ifdown).

   dhclient-script can potentially configure these files,

     /etc/resolv.conf
     /etc/yp.conf
     /etc/ntp.conf
     /etc/ntp/step-tickers
   
   It always has backed these up to ${FILE}.predhclient copies
   and then created the new ${FILE} when an new lease is configured
   (ifup); however, when the lease is relinquished (ifdown) it was
   not restoring these backup copies (it now does) .

3. NTP configuration :
   The default /etc/ntp.conf file as distributed with the ntp package
   was not preserved; dhclient-script used to write its own ntp.conf
   file containing ntp configuration statements that were out of 
   date (eg. 'authenticate  yes'), and removing server entries for
   local clocks.

   Now dhclient-script changes ONLY the server entries, removing 
   any server entries EXCEPT THE LOCAL CLOCK, and adding new DHCP
   ntp server values, writing all server values to
   /etc/ntp/step-tickers .   
  
   Both /etc/ntp.conf and /etc/ntp/step-tickers are backed up and the
   ntp server is restarted with the new files; the 
   ntp.conf.predhclient  and /etc/ntp/step-tickers.predhclient are
   restored and ntp restarted again when the lease is relinquished
   (ifdown).

4. NIS configuration:

   ypbind was not being told to reload /etc/yp.conf when a new 
   /etc/yp.conf was written by dhclient, so changes made by dhclient
   to the yp configuration could never take effect unless the server
   is manually restarted.

   Now, when dhclient-script changes yp.conf, if ypbind is running
   after yp.conf is changed, dhclient-script  sends ypbind a SIGHUP
   signal to reload yp.conf. If ypbind is not running, and ypbind
   is configured for the current runlevel, ypbind will be started up.
   If the yp.conf file becomes empty of any 'domain' or 'ypserver'
   entries, and ypbind gets a SIGHUP, it will shut itself down; so
   if the default yp.conf file before dhclient runs is empty, then
   ypbind will be automatically started when a lease is acquired, and
   shut down when the lease is relinquished.

5. A related problem (also related to bug #143704) was that during 
   an ifdown, dhclient did not release the lease ; now that dhclient 
   is fixed to properly shut down the dhclient run by ifup if invoked
   in -r mode, the /sbin/ifdown script will invoke dhclient -r to 
   release the lease, so that the '*.predhclient' files will be 
   restored when an 'ifdown' occurs .

  
Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

-- Additional comment from jvdias@redhat.com on 2005-01-13 10:21 EST --
Fixed in:
 FC4:    dhcp-3.0.2rc3-1+
 FC3:    dhcp-3.0.1-30_FC3+
       + initscripts-8.0.3+
Comment 1 Jason Vas Dias 2005-10-14 11:12:09 EDT
fixed with dhcp-3.0.1-40_EL3+
Comment 7 Jiri Popelka 2010-04-06 08:51:21 EDT
Closing as WONTFIX. dhcp-3.0.1-10_EL3 is the latest version shipped for RHEL-3.

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