Skip to content

Add delete template for dynamic BGP peers#22229

Merged
StormLiangMS merged 4 commits intosonic-net:masterfrom
NavdhaJindal:dev/navdhajindal/delete-template
May 10, 2025
Merged

Add delete template for dynamic BGP peers#22229
StormLiangMS merged 4 commits intosonic-net:masterfrom
NavdhaJindal:dev/navdhajindal/delete-template

Conversation

@NavdhaJindal
Copy link
Contributor

@NavdhaJindal NavdhaJindal commented Apr 3, 2025

Why I did it

This change is to support enhanced CRUD operations on dynamic bgp peers using a standard template-based mechanism.
Here is the High level design document explaining this feature:
sonic-net/SONiC#1963

Work item tracking
  • Microsoft ADO (number only):

How I did it

Upon a delete peer ocurring, we render the delete template(instead of executing the current behavior of no neighbor {{ neighbor addr}}), on the other hand if a delete template is not defined then the default behavior of no neighbor {{ neighbor addr}} applies as usual, thereby making this change backward compatible.

How to verify it

Create a dynamic peer like so in config_db.json:

"BGP_NEIGHBOR": {
"10.0.0.62": {
"admin_status": "up",
"asn": "65100",
"holdtime": "10",
"keepalive": "3",
"local_addr": "10.0.0.63",
"name": "vlab-01",
"nhopself": "0",
"rrclient": "0"
}
}

Once the peer is up, delete the neighbor (eg. config bgp neighbor remove ). Verify that the neighbor is deleted.

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

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)

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Apr 3, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@NavdhaJindal NavdhaJindal marked this pull request as ready for review April 17, 2025 20:04
@NavdhaJindal NavdhaJindal changed the title [DRAFT] Add delete template for BGP neighbors Add delete template for BGP neighbors Apr 17, 2025
@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@prsunny
Copy link
Contributor

prsunny commented Apr 24, 2025

@NavdhaJindal , can you please fill in the description with all details and behaviour change with and without this change?

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@NavdhaJindal NavdhaJindal changed the title Add delete template for BGP neighbors Add delete template for dynamic BGP peers Apr 25, 2025
@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

prsunny
prsunny previously approved these changes Apr 29, 2025
@StormLiangMS
Copy link
Contributor

hi @NavdhaJindal could you come up test plan and add test case in sonic-mgmt repo?

  1. When delete the dynamic, it won't cause impact on other neighbors like BGP flap on existing neighbors.
  2. When delete, no crash.
  3. Stress tests, adding/deleting for at least 20 cycles, no crash / BGP flap.

@NavdhaJindal NavdhaJindal force-pushed the dev/navdhajindal/delete-template branch from bed9fc4 to 1d99bb6 Compare May 7, 2025 16:33
@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@NavdhaJindal NavdhaJindal force-pushed the dev/navdhajindal/delete-template branch from 1d99bb6 to f5fb6ca Compare May 7, 2025 21:45
@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liushilongbuaa
Copy link
Contributor

/azpw ms_conflict

@NavdhaJindal NavdhaJindal force-pushed the dev/navdhajindal/delete-template branch from f5fb6ca to 0dec9f0 Compare May 8, 2025 21:09
@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@NavdhaJindal NavdhaJindal force-pushed the dev/navdhajindal/delete-template branch from 0dec9f0 to 7aa3729 Compare May 9, 2025 19:03
@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@StormLiangMS StormLiangMS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@StormLiangMS StormLiangMS merged commit c110b64 into sonic-net:master May 10, 2025
19 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.

7 participants