Page MenuHomeVyOS Platform

frr: reconcile config after every DHCP lease event
Closed, ResolvedPublicBUG

Description

The default route derived from interfaces <type> <ifname> address dhcp is rendered from the DHCP lease file, so it is only known at lease time. Until now the sole runtime path into FRRs staticd was the one-shot vtysh injection in dhclient-enter-hooks.d/03-vyos-ipwrapper. That injection races the FRR reload of the very commit which started the DHCP client: dhclient runs with -nw, thus the commit does not wait for a lease, and when BOUND arrives mid-reload this can report FRR as down. The route is then installed into the kernel only and FRR never learns about it. Nothing recovers afterwards, as FRRender.generate() short-circuits on an unchanged configuration dict.

The self-healing re-render used by protocols static route <prefix> dhcp-interface was gated on /tmp/static_dhcp_interfaces, which never lists plain address dhcp interfaces - protocols_static.py does not even run on an interface-only commit, as no config-mode dependency points to it.

Derive the DHCP dependent interface list from the configuration dict itself, both for the default VRF and for every named VRF, and use it for FRR change detection. Drop the interface list gate in the dhclient exit hook so any lease event requests a re-render.

Details

Version
rolling, 1.5.1
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)