Bug 1053431

Summary: dhcpd6.leases: file is too long to buffer
Product: Red Hat Enterprise Linux 6 Reporter: Michal Žejdl <zejdl>
Component: dhcpAssignee: Jiri Popelka <jpopelka>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team-automation>
Severity: high Docs Contact:
Priority: medium    
Version: 6.5CC: ljozsa, mganisin, ovasik
Target Milestone: rcKeywords: Patch
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: dhcp-4.1.1-39.P1.el6 Doc Type: Bug Fix
Doc Text:
Cause: When (IPv6 version of) dhcpd serves too many requests. Consequence: The leases file grows until it has many GB in size and dhcpd then refuses to restart with a message saying that 'file is too long to buffer'. Fix: Patch from upstream was back-ported. Result: dhcpd (for IPv6) rotates the leases file, so it can't grow so big.
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-14 04:31:34 UTC Type: Bug
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
possible patch
none
Proposed patch none

Description Michal Žejdl 2014-01-15 08:57:49 UTC
Description of problem:

With buggy clients (200 renews per second) dhcpd6.leases grow fast to GB size and dhcpd refuses to restart. Mine was 2.4 GB. Today another ended at 2.7 GB.

dhcpd: /var/lib/dhcpd/dhcpd6.leases: file is too long to buffer.

Smaller leases file (388 MB) is parsed and shrinked.



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

dhcp-4.1.1-38.P1.el6.centos.x86_64



How reproducible:

always



Actual results:

dhcpd: /var/lib/dhcpd/dhcpd6.leases: file is too long to buffer.



Expected results:

normal dhcpd start



Additional info:

They say that the bug was fixed in 4.2.4.

https://lists.isc.org/pipermail/dhcp-users/2013-November/017365.html

It would be nice to get to the ISC DHCP 4.3.0a1 (v6 uplift) for better RFC support. I'm waiting for ddns-update-style standard and primary6 in DDNS zone scope too.

Comment 2 Jaromír Končický 2014-01-16 16:39:10 UTC
Created attachment 851160 [details]
possible patch

I looked into changelog and found this might be what we are looking for:

			Changes since 4.2.4rc1

- Rotate the lease file when running in v6 mode.
  Thanks to Christoph Moench-Tegeder at Astaro for the
  report and the first version of the patch.
  [ISC-Bugs #24887]

I isolated the changes between 4.2.4rc1 and 4.2.4rc2 and this patch seems it shall handle it.
I will try to apply it on the RHEL version and see whether it fixes it.

Comment 3 Jaromír Končický 2014-01-21 09:27:51 UTC
Created attachment 853055 [details]
Proposed patch

Here is slightly adjusted version of the patch, made to be applicable on dhcp-4.1.1.

Comment 4 Michal Žejdl 2014-01-24 05:38:35 UTC
Tested with the patch. Works for me. Thanks.

Comment 9 errata-xmlrpc 2014-10-14 04:31:34 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-1406.html