-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[yang] Extended sonic-bmp.yang YANG model to include BMP collector(s) and policies #24965
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
kalash-nexthop
wants to merge
8
commits into
sonic-net:master
Choose a base branch
from
kalash-nexthop:bmp-configurable
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
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
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
935a389 to
6db007d
Compare
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
6db007d to
97eab6c
Compare
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
97eab6c to
7c47bfa
Compare
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
7c47bfa to
0dc9ea0
Compare
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
…ially multiple collectors) configuration parameters: IP, port, stats interval, retry intervals, monitor policies. - Updated unified/separated mode templates (bgpd.conf.db.j2 and bgpd.main.conf.j2) to use BMP configuration from CONFIG_DB with fallback to default values - Added BMP handler in frrcfgd.py to dynamically convert CONFIG_DB BMP changes to vtysh commands for runtime configuration updates - Supports multiple configurable monitor policies per target: pre-policy, post-policy, loc-rib - Default collector IP is 127.0.0.1 when not specified to maintain backward compatibility Signed-off-by: Kalash Nainwal <kalash@nexthop.ai>
0dc9ea0 to
920abdc
Compare
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
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.
Currently SONiC doesn't allow configuring external BMP collector, and instead relies on hard-coded local BMP collector config with only pre-policy support. Making this generic so that a user can set potentially multiple external collectors with multiple policies, as FRR already supports this.
Instead of just creating a PR with yang model, I added the vtysh cmd conversion stuff to this PR, so that I can demonstrate the model and corresponding vtysh config that's already supported in FRR.
fixes #24962
Why I did it
Currently SONiC doesn't allow configuring external BMP collector, and instead relies on hard-coded local BMP collector config with only pre-policy support. But some customers want to use external collectors with both pre and post policy config.
Work item tracking
How I did it
1- Extended sonic-bmp.yang YANG model to include BMP collector (potentially multiple collectors) configuration parameters: IP, port, stats interval, retry intervals, monitor policies.
2- The new yang model is similar to FRR's bmp yang model, but instead of using nested lists, it does below (3) so that SONiC's yang parser doesn't complain.
3- The model to allow multiple targets and collectors is similar to how BGP_NEIGHBOR container block is used for defining the neighbors, and then another BGP_NEIGHBOR_AF container to define afi-safis on those neighbors. I've verified that yang validation works for this.
4- Updated unified/separated mode templates (bgpd.conf.db.j2 and bgpd.main.conf.j2) to use BMP configuration from CONFIG_DB with fallback to default values
5- Added BMP handler in frrcfgd.py to dynamically convert CONFIG_DB BMP changes to vtysh commands for runtime configuration updates
6- Supports multiple configurable monitor policies per target: pre-policy, post-policy, loc-rib
7- Default collector IP is 127.0.0.1 when not specified to maintain backward compatibility
A sample yang model based on the new changes, showing multiple targets, multiple collectors per target, multiple afi-safis per target and multiple policies per afi-safi:
And corresponding vtysh commands in
vtysh -c "show running-config"How to verify it
config reload.config reloadas well asconfig replacedon't complain of yang validation failure for above model.Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)