Bug 144417

Summary: dhclient-script problems found & fixed
Product: [Fedora] Fedora Reporter: Jason Vas Dias <jvdias>
Component: dhcpAssignee: Jason Vas Dias <jvdias>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: sundaram
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-09-04 19:53:51 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 170778, 170779    

Description Jason Vas Dias 2005-01-06 15:29:37 EST
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,

   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

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:
Actual results:

Expected results:

Additional info:
Comment 1 Jason Vas Dias 2005-01-13 10:21:39 EST
Fixed in:
 FC4:    dhcp-3.0.2rc3-1+
 FC3:    dhcp-3.0.1-30_FC3+
       + initscripts-8.0.3+