dhclient appears to hang for a long time when no DHCP server available

Bug #1235298 reported by TJ
26
This bug affects 6 people
Affects Status Importance Assigned to Milestone
isc-dhcp (Ubuntu)
Confirmed
High
Unassigned

Bug Description

isc-dhcp 4.2.4-7ubuntu7 on 13.10 saucy amd64 server with multi-homed interfaces.

During "service networking start" or a manual "ifup -a", or a regular "ifup ethX", an interface configured to use DHCP to acquire its (IPv4) address will give the appearance of causing dhclient (or the calling process/script) to hang.

This was discovered on a multi-homed server having five Ethernet interfaces, only one of which is currently connected to anything. All interfaces are defined as:

auto ethX
iface ethX inet dhcp

Due to two separate Ubuntu-specific patches:

1) Fail to obey the "-1" command-line switch : "debian/patches/onetry_retry_after_initial_success"
2) increase time-out from 1 to 5 minutes: "debian/patches/dhclient-safer-timeout"

dhclient will hang for 5 minutes for each interface using DHCP. On a multi-homed system with 5 interfaces that is 25 minutes!

The patch for (1) is not doing what it claims. There is no initial success, and it over-rides the user's specific command-line parameter "-1", which causes dhclient to hang around (in the foreground) for the entire 5 minutes time-out, blocking the calling process. The code should not be arbitrarily altering a specific command-line option. If "-1 is undesirable the calling process (e.g. ifupdown) should have its calling arguments changed.

The patch for (2) is wrong. Imposing a new default ought to have been done via the 'dhclient.conf' "timeout" option.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in isc-dhcp (Ubuntu):
status: New → Confirmed
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.