diff options
| author | Christian Breunig <christian@breunig.cc> | 2026-10-10 22:10:32 +0200 |
|---|---|---|
| committer | Christian Breunig <christian@breunig.cc> | 2026-10-10 22:10:32 +0200 |
| commit | 1748e1eff7db459bfcaa69b28862dd2740fe1745 (patch) | |
| tree | 5d0484258b28e9191285842e13a2efaae951d44e /src/etc | |
| parent | 313ced7111e5f313ac6496db9cd92fac83f7b5b3 (diff) | |
| download | vyos-1x-1748e1eff7db459bfcaa69b28862dd2740fe1745.tar.gz vyos-1x-1748e1eff7db459bfcaa69b28862dd2740fe1745.zip | |
frrender: T9454: render FRR after a DHCP lease only once the commit completed
A lease event during a commit rendered FRR from the active configuration, which
the commit has not replaced yet. When the lease arrived after the commit's own
FRR render but before the commit finished, the stale render was applied and
nothing corrected it: moving a DHCP interface into a VRF left the VRF without
its default route.
The lease hook now starts the render detached and the render waits for the
running commit to complete. Detaching is required, as a commit stopping the
DHCP client waits for the release hook. Waiting is opt-in, as the commit itself
uses the same helper when it cannot reach the configuration daemon.
Diffstat (limited to 'src/etc')
| -rwxr-xr-x | src/etc/dhcp/dhclient-exit-hooks.d/98-vyos-static-routes-dhclient-hook | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/etc/dhcp/dhclient-exit-hooks.d/98-vyos-static-routes-dhclient-hook b/src/etc/dhcp/dhclient-exit-hooks.d/98-vyos-static-routes-dhclient-hook index 2c895ffd6..7c432d46c 100755 --- a/src/etc/dhcp/dhclient-exit-hooks.d/98-vyos-static-routes-dhclient-hook +++ b/src/etc/dhcp/dhclient-exit-hooks.d/98-vyos-static-routes-dhclient-hook @@ -34,5 +34,7 @@ elif [ "$reason" != "BOUND" ] && [ "$reason" != "EXPIRE" ] && [ "$reason" != "RE return 0 fi -# Reconcile the rendered FRR configuration with the current lease -sudo /usr/libexec/vyos/vyos-frr-render.py +# Reconcile the rendered FRR configuration with the current lease. The render +# waits for a running commit, which may itself wait for this dhclient to stop - +# do not block on it. +sudo systemd-run --no-block --collect --quiet /usr/libexec/vyos/vyos-frr-render.py --after-commit |
