Bug 126551

Summary: dhclient generates wrong lease records
Product: [Fedora] Fedora Reporter: goahead <goahead>
Component: dhcpAssignee: Jason Vas Dias <jvdias>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 2CC: goahead
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-07-29 19:54:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
During each 5400 sec period 2 leases are acquired none

Description goahead 2004-06-23 03:37:08 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.6) Gecko/20040510

Description of problem:
The values generated in lease records for the fields renew, rebind,
and expire contain wrong values for the time of day. A lease acquired
at 23. Jun 04:28 produces following record in
/var/lib/dhcp/dhclient-eth0.leases:

lease {
  interface "eth0";
  fixed-address 80.xxx.xxx.xx;
  option subnet-mask 255.255.240.0;
  option routers 80.xxx.xx.x;
  option dhcp-lease-time 5400;
  option dhcp-message-type 5;
  option domain-name-servers
62.2.17.60,62.2.24.162,62.2.17.61,62.2.24.158;
  option dhcp-server-identifier 62.2.28.9;
  option broadcast-address 255.255.255.255;
  option host-name "x1-6-00-xx-xx-xx-xx-xx";
  renew 3 2004/6/23 03:09:15;
  rebind 3 2004/6/23 03:46:48;
  expire 3 2004/6/23 03:58:03;
}

This lease was acquired, as said, at 04:28.

The usual lease time of my ISP is 5400. Still, dhclient renews the
lease after about 1/3 of the lease time. So during each 5400s period
the lease is renewed twice.


Version-Release number of selected component (if applicable):
dhclient-3.0.1rc12-4

How reproducible:
Always

Steps to Reproduce:
1. Compare the clock with the last record in your dhclient-eth0.leases
file whenever you like. -> You'll see that renew, rebind and expire
contain values in the past.

2. Or "tcpdump -s 400 -vv port 68" and compare the next lease you get
with the last record appended at that time. Notice that the timestamp
of dhclient-eth0.leases is correct but the record appended isn't.

3. Or look at the last few records in your dhclient-eth0.leases file
and see that the lease has been renewed unnecesserily again and again.
    

Actual Results:  The last record in dhclient-eth0.leases contains
wrong values for the actual lease.

Expected Results:  dhclient should append correct records to 
dhclient-eth0.leases

Additional info:

Comment 1 goahead 2004-06-25 13:22:39 UTC
I looked into old lease files. In all lease records the "expire" field
has an offset of -7200. When expire should be 5:58:03 it is 3:58:03.

The "rebind" field is always 675s less than "expire".

The offset for  "renew" is different in all records. I updated
dhclient to dhclient-3.0.1rc14-1 in the meantime. The problem remains.

Comment 2 Jason Vas Dias 2004-07-29 19:54:19 UTC
The DHCP lease times are written in GMT - so you must be at 
GMT +2:00 ?
So you get a lease at 4:28, (02:28 GMT) and it will expire 
5400 seconds later at 03:58 GMT, hence the entries in your
dhclient.leases file. 

See manual page for dclient.leases(5) about configuring 
rebind & renew offsets.

In the light of the above, does this statement still hold :
"
The usual lease time of my ISP is 5400. Still, dhclient renews the
lease after about 1/3 of the lease time. So during each 5400s period
the lease is renewed twice.
"
If so, please open a new bug about 
"dhcp leases expire before lease time" .




 



Comment 3 goahead 2004-07-31 01:26:54 UTC
I noticed that the 7200 sec difference equals the delta between UTC
and my local time which is CEST. 

In RFC 2131 the timers T1 and T2 are defined. At T1 "the client moves
to RENEWING state". "T1 defaults to (0.5 * duration_of_lease)" +- some
fuzz around the value. 

As the amount of fuzz is not defined it could be anything. So there
seems to be nothing wrong about the leases being renewed after 1/3 of
the lease time.

So this is not a bug, just disturbing. I'll switch back to pump.

Comment 4 goahead 2004-07-31 01:56:16 UTC
Created attachment 102331 [details]
During each 5400 sec period 2 leases are acquired

Comment 5 John Flanagan 2004-12-21 19:41:53 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2004-566.html