[kernel-bugs] [Bug 1173402] Kernel delays boot by 12s if ip= option given
https://bugzilla.suse.com/show_bug.cgi?id=1173402 https://bugzilla.suse.com/show_bug.cgi?id=1173402#c14 --- Comment #14 from Thomas Blume <thomas.blume@suse.com> --- (In reply to Fabian Vogt from comment #12)
(In reply to Thomas Blume from comment #11)
Can you please give the dracut package at:
https://build.opensuse.org/package/binaries/home:tsaupe:branches:openSUSE: Factory:dracut-bsc1173402/dracut/openSUSE_Factory
a try?
Works!
Looking at this again, this is quite the mess... AFAICT, touching the did-setup file after a successful "do_dhcp" is generally the right way.
This is currently not done, which lead to https://github.com/tblume/dracut/commit/ 0b998beebc008f2dda2eed8a36d59f4a258cb27a adding another path to create did-setup. This new path was broken by https://github.com/tblume/dracut/commit/ 28be2f3692d6a641c841f636c03e45c5f3c4ec6b, which you now fixed with https://github.com/tblume/dracut/commit/ 487fb167b82c88871e6d1ace21ccdb0a48e9032d.
What should be done IMO:
- Touch did-setup in the "# No ip lines default to dhcp" case after successful do_dhcp
The code there really looks wrong: --> if [ -z "$NO_AUTO_DHCP" ] && [ -z "$ip" ]; then if [ "$netroot" = "dhcp6" ]; then do_dhcp -6 else do_dhcp -4 fi --< That runs do_dhcp -4 in any case if there is no ip= line and dhcp isn't explicitly disabled. But that code is apparently for the netroot case, so it needs to be checked whether $netroot is filled. After this, a did-setup is indeed appropriate IMHO.
- Touch did-setup in the "# no ip option directed at our interface?" case after successful do_dhcp
0b998beebc008f2dda2eed8a36d59f4a258cb27a introduced the code to handle the latter, but: - It also runs in cases where the do_dhcp in this block wasn't actually run (like in this bug report) - The $? it checks is meaningless at this point due to the ifs
Hm, did you check the latest code? There is: if [ $? -eq 0 ] && [ -n "$(ls /tmp/leaseinfo.${netif}*)" ]; then the leasinfo file won't be there if there was no dhcp setup.
In the "rd.neednet=1 bootdev=eth0" case it actually runs do_dhcp twice for the interface, as both "# No ip ..." blocks apply. Maybe those blocks should be merged?
Those parameters are a bit different, bootdev is documented as: --> bootdev=<interface> specify network interface to use routing and netroot information from. Required if multiple ip= lines are used. --< So it is bound to the netroot case and a specific interface, whereas rd.neednet does the network setup unconditionally. Also, the code for evaluating rd.neednet isn't in ifup.sh but in net-genrules.sh. Considering the duplicate run of do_dhcp, I'd blame this at the missing check for netroot as outlined above. -- You are receiving this mail because: You are the assignee for the bug.
participants (1)
-
bugzilla_noreply@suse.com