dhclient appears to hang for a long time when no DHCP server available
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/
2) increase time-out from 1 to 5 minutes: "debian/
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.
Status changed to 'Confirmed' because the bug affects multiple users.