vyos-dhclient-lease-watch (T9108) restarts dhclient@<iface> when the lease's renew time is more than 15 minutes past and the lease has not expired. The restart runs the unit's ExecStop=/sbin/dhclient -4 -r, which releases the lease and removes the address and routes. If the DHCP server still does not answer, the interface stays without an address, although the lease was valid and traffic was still working.
Test: interfaces ethernet eth1 address dhcp, lease time 3600 s from a VyOS DHCP server, server stopped right after the client got its lease (minute 0). With the T9108 lease-watch (times are minutes after the lease was obtained):
min 38 addr=[10.88.2.100/24 ] routes=[default via 10.88.2.1 ...; 10.88.2.0/24 ...] min 39 vyos-dhclient-lease-watch[6464]: dhclient@eth1.service: DHCPv4 RENEW overdue (likely stuck unicast RENEW); restarting client to force rediscovery min 42 addr=[] routes=[] ... min 76 dhclient[6543]: No DHCPOFFERS received. min 76 dhclient[6543]: No working leases in persistent database - sleeping.
On 1.5.1 the address and default route stayed until the lease expired (gone between minute 58 and 62; the sampler reads every 4 min).
address present 52 min after bind (lease 60 min, server unreachable) 1.5.1 3/3 with T9108 0/3
Here about 20 minutes of a 60-minute lease were lost; with a multi-hour ISP lease the router loses the WAN address hours before the lease would expire. The DHCPRELEASE also tells the server the address is free, so the router may get a different address when the server comes back.
Cause
T9108 (https://github.com/vyos/vyos-1x/pull/5341, src/helpers/vyos-dhclient-lease-watch) restarts the unit with systemctl restart dhclient@<iface>; src/systemd/dhclient@.service stops with dhclient -4 -r (release). A DHCP server that is unreachable for a while is enough to trigger it.
Suggested fix
Restart without releasing (stop dhclient with -x instead of -r on this path, or kill and start the unit), and/or only force rediscovery after REBIND has also failed, so a valid lease is kept while it is still valid.