[Bug 2058628] Re: initramfs-tools dhcpcd timeout
Benjamin Drung
2058628 at bugs.launchpad.net
Fri Apr 5 19:42:27 UTC 2024
initramfs-tools 0.142ubuntu23 landed in noble.
** Changed in: initramfs-tools (Ubuntu)
Status: Fix Committed => Confirmed
** Changed in: initramfs-tools (Ubuntu)
Status: Confirmed => Fix Released
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to initramfs-tools in Ubuntu.
https://bugs.launchpad.net/bugs/2058628
Title:
initramfs-tools dhcpcd timeout
Status in initramfs-tools package in Ubuntu:
Fix Released
Bug description:
Hi,
We found an issue in `initramfs-tools-core` (noble,now 0.142ubuntu20
all) related to this change :
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/2024164
(dhclient replaced by dhcpcd).
dhclient was faster to give an IP. In the `initramfs-tools-core`
scripts, in **/usr/share/initramfs-tools/scripts/functions**, the
ROUNDTTT iterations at _2, 3, 4 or even 6 seconds_ fail. This delays
obtaining an IPv4 by at least 20 seconds.
```
# support ip options see linux sources
# Documentation/filesystems/nfs/nfsroot.txt
# Documentation/frv/booting.txt
for ROUNDTTT in 2 3 4 6 9 16 25 36 64 100; do
local iter_entry_time iter_exit_time
iter_entry_time=$(time_elapsed)
if [ -z "${DEVICE}" ]; then
_set_available_devices_to_up
fi
case ${IP} in
none|done|off)
# Do nothing
IP="done"
;;
""|on|any|dhcp|bootp|both)
dhcpcd -1 -t $ROUNDTTT -4 ${DEVICE:+"${DEVICE}"}
;;
*)
ipconfig -t ${ROUNDTTT} -d "$IP"
```
dhcpcd takes at least 5/6 seconds to give an ipv4 because of the arp
probbing to check that the ip is not already in use.
**Possible Fixes**: `dhcpcd --noarp` prevents waiting, otherwise
redistribute the ROUNDTTT iterations by deleting the iterations at 2 3
4 or even 6 seconds.
NB: this problem probably only concerns obtaining an IP in IPv4, I
have not checked if the problem also arises in IPv6.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/2058628/+subscriptions
More information about the foundations-bugs
mailing list