[systemd-devel] networkd losing dhcp lease with dracut / nfs root

Rich Freeman r-systemd at thefreemanclan.net
Mon Jul 14 18:50:56 PDT 2014


On Sun, Jun 29, 2014 at 10:27 AM, Tom Gundersen <teg at jklm.no> wrote:
> On Sat, Jun 28, 2014 at 11:29 AM, Tom Gundersen <teg at jklm.no> wrote:
>> Your analysis is correct. networkd is not updating the lft.
>>
>> We should change two things: dracut (or whatever is being used on your
>> machine) should set an infinite lifetime when using NFS root (IMHO),
>> and networkd should update the lft (and in particular force-set it to
>> infinite if CriticalConnection is being used).
>>
>> The latter is on my TODO.
>
> I just pushed a fix for this in networkd, please let me know if you
> are still having issues.

Did this make it into 215?  If so, I'm still seeing "odd" behavior
though it no longer crashes.

I have a 5min dhcp lease (for testing).

If I set CriticalConnection then it sets valid_lft to forever, and if
not it starts at 300s - this seems right.

At 150 seconds left it renews DHCP, but does not update valid_lft
A minute later it again renews DHCP, but also does not update valid_lft.
51 seconds later it again renews DHCP, and this time it updates valid_lft.

So, the interface never drops, but it isn't really maintaining
valid_lft at all points where it could.  I don't know what would have
happened if it didn't get the lease at the last update - at that point
there was around 30s left.  I guess I could test that if necessary by
shutting down the dhcp server.

Rich


More information about the systemd-devel mailing list