Skip to content

fix(config): disable graceful restart on the example rustbgpd neighbor - #349

Merged
lance0 merged 3 commits into
mainfrom
fix/rustbgpd-example-neighbor-gr
Oct 26, 2026
Merged

lance0 merged 3 commits into
mainfrom
fix/rustbgpd-example-neighbor-gr

Conversation

@lance0

@lance0 lance0 commented Oct 26, 2026

Copy link
Copy Markdown
Owner

Summary

The example configs/rustbgpd.toml, which the Compose rustbgpd profile 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 at selected: false for about two minutes. MarkReplayComplete does not end this hold.

  • configs/rustbgpd.toml: set graceful_restart = false on 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, that MarkReplayComplete does not end it, and why the shipped example disables GR. The wording matches the selection-hold text that main gained with the selection_deferred export-evidence reason, and the speaker-backends note links to that section.
  • CHANGELOG.md: [Unreleased] / ### Fixed entry.

The key is the neighbor-level graceful_restart (bool, default true) 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.1 rustbgpd --dump-config-schema output (Neighbor.graceful_restart). The hold is bounded by gr_restart_time. gr_eor_grace_time is 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.toml and rustbgpd-srlinux-probe.toml peer 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 use stop_with_timeout(Some(0)) (SIGKILL). That restart writes no planned-restart marker, so no deferral starts.
  • docker-compose.yml and scripts/test-compose.py have no neighbor config of their own. Compose mounts the fixed example.

Verification

  • rustbgpd --check --strict with the pinned v0.80.1 image digest from tests/fixtures/rustbgpd/releases.json: config OK (exit 0) for both the old and the new configs/rustbgpd.toml.
  • Restart timing, using a disposable rustbgpd v0.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, then docker restart -t 30 (SIGTERM, a planned restart that writes the GR marker). Then re-inject and poll the local injection view (ListFlowSpecRoutes with received_peer_address = "0.0.0.0") until the rule is selected: true:
    • Old config (negative control): re-injected at +0.27 s, selected: true at +119.9 s. The Loc-RIB was empty until then. The daemon logged RFC 4724 route-selection deferral released ... reason: Selection_Deferral_Timer expired for IPv4 and IPv6 FlowSpec, after a marker with restart_time_secs: 120.
    • New config: re-injected at +0.25 s, selected: true at +0.32 s. The rule was in the Loc-RIB right after re-injection.
    • The test containers and runtime dirs were removed afterwards.
  • just gate on db4685a: passed (exit 0).
  • git diff --check: clean.

@lance0
lance0 marked this pull request as ready for review October 26, 2026 16:06
@lance0
lance0 merged commit 1b04148 into main Oct 26, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant