Repository navigation
fix(config): disable graceful restart on the example rustbgpd neighbor - #349
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The example
configs/rustbgpd.toml, which the Composerustbgpdprofile mounts, ships a placeholder neighbor (192.0.2.1) that never connects, and it left Graceful Restart at rustbgpd's default (on). Injected routes are held from selection after a speaker restart until its Graceful Restart peers send End-of-RIB or the restart window (gr_restart_time, 120 seconds by default) expires. A placeholder that never comes up holds them for the full window, so every quickstart or lab restart left re-injected FlowSpec rules atselected: falsefor about two minutes.MarkReplayCompletedoes not end this hold.configs/rustbgpd.toml: setgraceful_restart = falseon the placeholder neighbor and keep the neighbor so the file still works as a template. A comment says to enable GR on real peers that support it.docs/reference/speaker-backends.md,docs/how-to/upgrading.md: note the post-restart selection hold, thatMarkReplayCompletedoes not end it, and why the shipped example disables GR. The wording matches the selection-hold text that main gained with theselection_deferredexport-evidence reason, and the speaker-backends note links to that section.CHANGELOG.md:[Unreleased]/### Fixedentry.The key is the neighbor-level
graceful_restart(bool, defaulttrue) in rustbgpd v0.80.1. It appears in rustbgpd's configuration reference, which has a "To disable GR for a specific peer" example, and in the v0.80.1rustbgpd --dump-config-schemaoutput (Neighbor.graceful_restart). The hold is bounded bygr_restart_time.gr_eor_grace_timeis a separate setting: it holds End-of-RIB toward a peer, is off by default and is unchanged here.Left unchanged on purpose
lab/interop/configs/rustbgpd.tomlandrustbgpd-srlinux-probe.tomlpeer with real FRR / SR Linux nodes that come up, and the FRR lab tests GR behaviour directly (test_graceful_restart_stale_path).tests/common/rustbgpd.rs: its never-Established unicast peer is part of the scenario under test, and fixture restarts usestop_with_timeout(Some(0))(SIGKILL). That restart writes no planned-restart marker, so no deferral starts.docker-compose.ymlandscripts/test-compose.pyhave no neighbor config of their own. Compose mounts the fixed example.Verification
rustbgpd --check --strictwith the pinned v0.80.1 image digest fromtests/fixtures/rustbgpd/releases.json:config OK(exit 0) for both the old and the newconfigs/rustbgpd.toml.rustbgpdv0.80.1 container (pinned digest) with the shipped config, a bind-mounted runtime dir and the same cpuset. Steps: inject an IPv4 FlowSpec rule over the UDS, thendocker restart -t 30(SIGTERM, a planned restart that writes the GR marker). Then re-inject and poll the local injection view (ListFlowSpecRouteswithreceived_peer_address = "0.0.0.0") until the rule isselected: true:selected: trueat +119.9 s. The Loc-RIB was empty until then. The daemon loggedRFC 4724 route-selection deferral released ... reason: Selection_Deferral_Timer expiredfor IPv4 and IPv6 FlowSpec, after a marker withrestart_time_secs: 120.selected: trueat +0.32 s. The rule was in the Loc-RIB right after re-injection.just gateon db4685a: passed (exit 0).git diff --check: clean.