[Bug 2065037] Re: dhcpcd is called before interfaces have carrier causing a 29 seconds boot delay
Timo Aaltonen
2065037 at bugs.launchpad.net
Fri May 10 16:36:54 UTC 2024
Hello Stefano, or anyone else affected,
Accepted initramfs-tools into noble-proposed. The package will build now
and be available at https://launchpad.net/ubuntu/+source/initramfs-
tools/0.142ubuntu25.1 in a few hours, and then in the -proposed
repository.
Please help us by testing this new package. See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how
to enable and use -proposed. Your feedback will aid us getting this
update out to other Ubuntu users.
If this package fixes the bug for you, please add a comment to this bug,
mentioning the version of the package you tested, what testing has been
performed on the package and change the tag from verification-needed-
noble to verification-done-noble. If it does not fix the bug for you,
please add a comment stating that, and change the tag to verification-
failed-noble. In either case, without details of your testing we will
not be able to proceed.
Further information regarding the verification process can be found at
https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in
advance for helping!
N.B. The updated package will be released to -updates after the bug(s)
fixed by this package have been verified and the package has been in
-proposed for a minimum of 7 days.
** Changed in: initramfs-tools (Ubuntu Noble)
Status: New => Fix Committed
** Tags added: verification-needed verification-needed-noble
--
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/2065037
Title:
dhcpcd is called before interfaces have carrier causing a 29 seconds
boot delay
Status in initramfs-tools package in Ubuntu:
Fix Committed
Status in initramfs-tools source package in Noble:
Fix Committed
Bug description:
[ Impact ]
The boot time can be longer on system that configure their network in
the initrd.
[ Test Plan ]
The affected systems show "Sleeping $time seconds before retrying
getting a DHCP lease" in their boot log. Once applying the fix, this
message should not be found any more and "dhcpcd-10.0.6 starting"
should be only logged once (at most once for IPv4 and once for IPv6
depending on the boot parameters).
There are qemu-net and qemu-net-dnsmasq autopkgtests for this area of
code.
[ Where problems could occur ]
The DHCP code in the initrd are touched. So the boot can be affected.
Also updating initramfs-tools will regenerate the initrd and can cause
issues there (like full disks, etc).
[ Original report ]
In automatically encrypted Clevis+Tang unlock of LUKS encrypted device
(dmcrypt/cryptsetup) - on top of which the ZFS Pool for / resides,
dhcpcd is used in order to obtain automatically an IP address during
initramfs boot.
During this phase, dhcpcd is called before interfaces have carrier
causing a 29 seconds boot delay.
Boot delay is currently 45 seconds, instead of the 15 seconds that it
should.
BUG Initially reported in:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/2064926
Relevant Logs:
```
dhcpcd-10.0.6 starting
[...]
no interfaces have a carrier
exiting due to oneshot
dhcpcd exited
Sleeping 29 seconds before retrying getting a DHCP lease
dhcpcd-10.0.6 starting
```
A possible workaround would be to manually edit /usr/share/initramfs-tools/scripts/functions
Changing this:
`for ROUNDTTT in 30 60 90 120; do`
To this:
`for ROUNDTTT in 5 5 5 5; do`
But the proper solution would be to continuously "scan" the state of
the Interface (every Second or so), and wait until the interface is
UP, before deciding to call dhcpcd.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/2065037/+subscriptions
More information about the foundations-bugs
mailing list