PXE clients eventually exhaust address pool

Bug #26822 reported by Paolo Benvenuto
6
Affects Status Importance Assigned to Milestone
dhcp3 (Ubuntu)
Invalid
Low
Ian Jackson

Bug Description

I have 40 clients connected to a edubuntu server.

After various day of use of the system, clients booting got slower and slower,
and eventually the clients got a "no free leases" messages from dhcp3 server.

The only way to use the system was deleting /var/lib/dhcp3/dhcp.leases and
restarting dhcp3 service.

Revision history for this message
Matt Zimmerman (mdz) wrote :

Attach the leases file.

Revision history for this message
Paolo Benvenuto (donpaolo) wrote :

Created an attachment (id=5286)
dhcpd.leases

this is the dhcpd.leases files I had after getting the "no free leases"
messagge from dhcpd server

Revision history for this message
Paolo Benvenuto (donpaolo) wrote :

Created an attachment (id=5287)
syslog

This is the syslog of the process of having 35 clients booting.

I switched on the 35 clients, and as soon as a client got the UI login, I reset
it.

I could have a total of 115 clients boots, corresponding to the available IP's
(192.168.0.20-250), every boot uses _two_ IP's.

Revision history for this message
Paolo Benvenuto (donpaolo) wrote :

The two attachments I created refer to the same situation: 35 clients booting
repeatedly, until the "no free leases" messagges is issued by the dhcpd server.

Matt Zimmerman (mdz)
Changed in dhcp3:
assignee: nobody → ijackson
Revision history for this message
Ian Jackson (ijackson) wrote : More more info, please

I've tried reproducing this but without success. (I don't have an
edubuntu setup, so I was just using a normal dhcp config with a
vanilla client.) Could you please provide me with some more
information ? I'd like:

 * Output from tcpdump -vvs500 -lnieth0 on the dhcp server
   during one client lease negotiation (not for a whole session
   or it'll be very long)
 * /etc/dhcp3/dhcpd.conf from the server
 * command line and dhcp client config file (/etc/dhclient.conf
   or whatever) from the client, if it's not the kernel builtin one.

Thanks,
Ian.

Revision history for this message
Matt Zimmerman (mdz) wrote : Re: dhcp3 server respond with a "no free leases" to IP request in edubuntu

This happens because the PXE ROM obtains a lease but doesn't release it when it's finished. If enough client boots take place, these leases will consume the pool on the server.

I don't think there is much that Ubuntu can do about this problem; I'd consider it a bug in the firmware.

It's possible that the DHCP server could distinguish between PXE requests and other requests, and use a much shorter lease time for those.

Changed in dhcp3:
assignee: ijackson → nobody
status: Unconfirmed → Confirmed
Revision history for this message
Ian Jackson (ijackson) wrote :

I haven't read the RFC recently, but it would seem to me that the DHCP server ought to hand out the IP address it gave to PXE again when the Ubuntu client asks, or at least reuse the same address when PXE asks the 2nd time.

Failing that, configuring the Edubuntu server to hand out 30s (say) leases by default, and longer ones to actual Ubuntu clients, would be an approximation to what mdz suggests.

Note that to be guaranteed not to fail this approach does need an address pool ((default timeout) / (time from hard reboot to PXE DHCP request)) times the number of machines you have, which is rather unfortunate.

Revision history for this message
Ian Jackson (ijackson) wrote :

Well, now I have read the RFC and together with my earlier tests I do think there is probably a bug in the dhcpd.

MDZ's comment about the PXE ROM is very relevant (I don't have a convenient PXE device here to test with right now), so I'd like to amend my request for additional information to:

 * Output from tcpdump -vvs500 -lnieth0 on the dhcp server
   during one client boot sequence until just past the point where the Ubuntu dhcpd does its lease negotiation
 * /etc/dhcp3/dhcpd.conf from the server
 * command line and dhcp client config file (/etc/dhclient.conf or whatever) from the client, if it's not the kernel builtin one.

Thanks.

Changed in dhcp3:
assignee: nobody → ijackson
status: Confirmed → Needs Info
Revision history for this message
Ian Jackson (ijackson) wrote :

Without the requested information, I'm afraid there's little than we can do.

Changed in dhcp3:
status: Needs Info → Rejected
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.