[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#c16 --- Comment #16 from Thomas Blume <thomas.blume@suse.com> --- (In reply to Fabian Vogt from comment #15)
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.
Yes, but the use of $? there is still wrong AFAICT.
Ah, you mean when there is no ip= option at all and no bootdev either? But how should the network get set up via ifup then? Using rd.neednet without specifying an interface would make the script bail out early: --> # Huh? No $1? [ -z "$1" ] && exit 1 --< There is the ifname boot parameter, but that is again covered in another script, e.g. parse-ifname.sh.
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.
That seems to be working with netroot, but not depend on netroot. It doesn't say that bootdev can only be specified if multiple ip= options are set, but only that it is mandatory in that case.
Hm, right, even though it doesn't make sense it is allowed to set rd.neednet together with bootdev. But in any case the bootdev option requires an specific interface name while in the rd.neednet only case $iface should be empty.
Not tested, but would that just move the "dhcp twice" case to netroot only? There's nothing which prevents the "# no ip option directed at our interface?" block from running after "# No ip lines default to dhcp" as the former doesn't touch /tmp/net.${netif}.up, does it?
Maybe, I'm overlooking something but AFAICS, the second if would call do_dhcp only when bootdev is set or ip=dhcp(6); --> if [ -e /tmp/net.bootdev ]; then BOOTDEV=$(cat /tmp/net.bootdev) if [ "$netif" = "$BOOTDEV" ] || [ "$BOOTDEV" = "$(cat /sys/class/net/${netif}/address)" ]; then load_ipv6 do_dhcp fi else if getargs 'ip=dhcp6'; then load_ipv6 do_dhcp -6 fi if getargs 'ip=dhcp'; then do_dhcp -4 fi fi --< So, it shouldn't run again after the "# No ip lines default to dhcp" part. But it would write did-setup, which is fine since it could have been setup in "# No ip lines default to dhcp". Please note I appreciate your comments and will try to addess them as best as possible, but without breaking anything working. Unfortunately code changes here are very delicate since it has a big impact on netboot. -- You are receiving this mail because: You are the assignee for the bug.
participants (1)
-
bugzilla_noreply@suse.com