Skip to content

[Cisco][bugfix] [FBOSSCSC-36] Support BGP version in OSS builds - #2021

Open
selekkala wants to merge 2 commits into
meta:mainfrom
selekkala:reopen/pr-1665-bgp-version
Open

selekkala wants to merge 2 commits into
meta:mainfrom
selekkala:reopen/pr-1665-bgp-version

Conversation

@selekkala

Copy link
Copy Markdown
Contributor

Pre-submission checklist

  • I've run the linters locally and fixed lint errors related to the files modified in this PR.
  • pre-commit run --files for every modified file.

Summary

fboss2 show bgp version currently throws unconditionally in OSS builds because the Meta-internal getRegexExportedValues extension is unavailable.

This change adds an additive TBgpService.getBuildInfo RPC to the shared BGP Thrift definition and uses it only in the OSS CLI path. Internal builds retain the existing fb303 path. If the CLI reaches a pre-API daemon, it converts Thrift's UNKNOWN_METHOD response into an actionable upgrade-and-restart message.

The BGP daemon-side handler lives in the separate facebook/BGP repository and must be deployed together with this client change. The compatibility error makes mixed-version rollout explicit rather than failing with the previous unsupported-command exception.

Test Plan

  • pre-commit run --files cmake/CliFboss2Test.cmake fboss/cli/fboss2/commands/show/bgp/CmdShowVersionBgp.cpp fboss/cli/fboss2/test/CmdShowBgpVersionTest.cpp fboss/cli/fboss2/test/bgp/MockBgpClient.h neteng/fboss/bgp/if/bgp_thrift.thrift — passed.
  • Added CmdShowBgpVersionTestFixture.QueryClientReturnsRunningBuildInfo to verify the CLI returns daemon-provided metadata.
  • Added CmdShowBgpVersionTestFixture.QueryClientRejectsOldDaemon to verify the mixed-version compatibility error.
  • Runtime validation on two OSS switches with a daemon implementing the additive RPC.
Live OSS router validation logs (two switches)

Switch A:

$ systemctl is-active fboss_hw_agent@0 fboss_sw_agent openr bgpd
active
active
active
active

$ fboss2 show bgp version
Package Name: bgp
Package Info: bgp-cd8f26fd
Package Version: cd8f26fd
Build Details:
        Platform: Linux
        Revision: cd8f26fd

$ fboss2 show bgp summary
BGP is up for 9m 52s
Router ID - 9.9.9.9, Local ASN - 65001
Peers: UP - 2, TOTAL - 2
Paths: Received - 3, Accepted - 3, Sent - 5
Loc-RIB Prefix Count: 5

Switch B:

$ systemctl is-active fboss_hw_agent@0 fboss_sw_agent openr bgpd
active
active
active
active

$ fboss2 show bgp version
Package Name: bgp
Package Info: bgp-cd8f26fd
Package Version: cd8f26fd
Build Details:
        Platform: Linux
        Revision: cd8f26fd

$ fboss2 show bgp summary
BGP is up for 9m 48s
Router ID - 8.8.8.8, Local ASN - 65001
Peers: UP - 2, TOTAL - 2
Paths: Received - 3, Accepted - 3, Sent - 5
Loc-RIB Prefix Count: 5

Both switches had the BGP Thrift listener active and no BGP warnings or new coredumps during the validation window.

The focused C++ tests are included for CI execution; the production image used for runtime validation does not package test binaries.

@selekkala
selekkala requested review from a team as code owners November 19, 2026 07:16
@github-actions github-actions Bot added cisco project:fboss2 FBOSS project: fboss2 labels Nov 19, 2026
@meta-cla meta-cla Bot added the CLA Signed label Nov 19, 2026
@selekkala selekkala changed the title [Cisco][fboss2] [FBOSSCSC-36] Support BGP version in OSS builds [Cisco][bugfix] [FBOSSCSC-36] Support BGP version in OSS builds Nov 19, 2026
@github-actions github-actions Bot added project:bugfix FBOSS project: bugfix and removed project:fboss2 FBOSS project: fboss2 labels Nov 19, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants