Code review comment for ~mwhudson/ubuntu/+source/initramfs-tools:refactor-networking

Revision history for this message
Scott Moser (smoser) wrote :

A few comments inline + these here.

> Tidy up configure_networking a bit:
>
> - Just let dhclient scan the interfaces if none is specified for IPv6.

'a' below also applies here even though the change you've made does not change 'b' as we're already doing it for ipv6.

> - Do not handle ip=rarp specially (ipconfig hasn't supported it for some
> time)

this seems like we should forward it to debian. just to reduce delta, even
though we are high-delta here. I assume the fix applies in debian also.

> - Call dhclient in simple cases for IPv4 (this makes some small observable
> changes -- for example ip=bootp will now make a DHCP request too -- but
> nothing that seems important).

The reasons that we kept using ipconfig previously for ipv4 were
a.) it has known behavior. The loop over existing interfaces means only one is "found", and timeouts of ipconfig are specified on the command line versus hard coded into dhclient. That means that if you have 4 nics and the last one is the one that has a dhcp server on it, then you'll end up waiting 3 (failed) ROUNTTTT and then a hit. With dhclient, the value I think is 60 seconds meaning you'd wait much more than that.

b.) At least as it is right now, the dhclient process is not at all cleaned up. ipconfig exits after it receives a lease, dhclient backgrounds itself. Then we pivot root out of that initramfs and the process stil lives. What happens when it goes to renew a lease? Or when it fails? Those were unknowns.

« Back to merge proposal