Skip to content
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

[chassis]: Support show ip bgp summary to display without error when no external neighbors are configured on chassis LC #3099

Merged
merged 2 commits into from
Jan 5, 2024

Conversation

arlakshm
Copy link
Contributor

What I did

Support show ip bgp summary to display without error when no external neighbors are configured on chassis LC

Fixes: #3098
MSFT ADO: 26238398:

How I did it

On Chassis linecard with no external neighbors the show ip bgp summary fails because the on chassis linecard there are internal iBGP sessions are present so frr output has this information.

With this fix with this case is handled so that the commands do not display any error but instead we are display the below output

autotest@sonic:~$ show ip bgp summary

IPv4 Unicast Summary:
asic0: BGP router identifier 192.0.0.1, local AS number 65100 vrf-id 0
BGP table version 11
asic1: BGP router identifier 192.0.0.2, local AS number 65100 vrf-id 0
BGP table version 12
RIB entries 0, using 0 bytes of memory
Peers 0, using 0 KiB of memory
Peer groups 0, using 0 bytes of memory


Neighbhor    V    AS    MsgRcvd    MsgSent    TblVer    InQ    OutQ    Up/Down    State/PfxRcd    NeighborName
-----------  ---  ----  ---------  ---------  --------  -----  ------  ---------  --------------  --------------

Total number of neighbors 0
autotest@sonic:~$

How to verify it

UT and chassis and test the command on pizza box sonic

Previous command output (if the output of a command-line utility has changed)

admin@sonic:~$ show ip bgp summary

IPv4 Unicast Summary:
asic0: BGP router identifier 10.212.65.8, local AS number 64902 vrf-id 0
BGP table version 2303
asic1: BGP router identifier 10.212.65.9, local AS number 64902 vrf-id 0
BGP table version 2887
RIB entries 2696, using 496064 bytes of memory
Peers 18, using 13334544 KiB of memory
Peer groups 4, using 256 bytes of memory


Usage: show ip bgp summary [OPTIONS]
Try "show ip bgp summary -h" for help.

Error: peers missing in the bgp_summary
admin@sonic:~$ 

New command output (if the output of a command-line utility has changed)

autotest@sonic:~$ show ip bgp summary

IPv4 Unicast Summary:
asic0: BGP router identifier 192.0.0.1, local AS number 65100 vrf-id 0
BGP table version 11
asic1: BGP router identifier 192.0.0.2, local AS number 65100 vrf-id 0
BGP table version 12
RIB entries 0, using 0 bytes of memory
Peers 0, using 0 KiB of memory
Peer groups 0, using 0 bytes of memory


Neighbhor    V    AS    MsgRcvd    MsgSent    TblVer    InQ    OutQ    Up/Down    State/PfxRcd    NeighborName
-----------  ---  ----  ---------  ---------  --------  -----  ------  ---------  --------------  --------------

@abdosi abdosi merged commit 9515c64 into master Jan 5, 2024
5 checks passed
@gechiang
Copy link
Contributor

gechiang commented Jan 6, 2024

Removed "Request for 202205 branch" label as we will cherry-pick this directly to the msft repo 202205 branch instead,

@gechiang
Copy link
Contributor

gechiang commented Jan 6, 2024

PR to Cherry-pick to msft repo:
Azure/sonic-utilities.msft#40

@gechiang gechiang added the included in chassis for 202205 branch indicate that this PR got merged into the "chassis for 202205 branch" label Jan 6, 2024
mssonicbld pushed a commit to mssonicbld/sonic-utilities that referenced this pull request Jan 18, 2024
…no external neighbors are configured on chassis LC (sonic-net#3099)

Support show ip bgp summary to display without error when no external neighbors are configured on chassis LC
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202305: #3125

mssonicbld pushed a commit that referenced this pull request Jan 18, 2024
…no external neighbors are configured on chassis LC (#3099)

Support show ip bgp summary to display without error when no external neighbors are configured on chassis LC
mssonicbld pushed a commit to mssonicbld/sonic-utilities that referenced this pull request Feb 2, 2024
…no external neighbors are configured on chassis LC (sonic-net#3099)

Support show ip bgp summary to display without error when no external neighbors are configured on chassis LC
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202311: #3143

mssonicbld pushed a commit that referenced this pull request Feb 2, 2024
…no external neighbors are configured on chassis LC (#3099)

Support show ip bgp summary to display without error when no external neighbors are configured on chassis LC
arlakshm added a commit that referenced this pull request Feb 8, 2024
…SIC (#3158)

This PR #3099 fixes the case where on chassis Linecard there are no BGP neighbors. However, if the Linecard has neighbors on one ASIC but not on other, the command show bgp summary displayed no neighbors. This PR fixes this.

How I did it
Add check in bgp_util to create empty peer list only once
Add UT to cover this case
mssonicbld pushed a commit to mssonicbld/sonic-utilities that referenced this pull request Feb 12, 2024
…SIC (sonic-net#3158)

This PR sonic-net#3099 fixes the case where on chassis Linecard there are no BGP neighbors. However, if the Linecard has neighbors on one ASIC but not on other, the command show bgp summary displayed no neighbors. This PR fixes this.

How I did it
Add check in bgp_util to create empty peer list only once
Add UT to cover this case
mssonicbld pushed a commit that referenced this pull request Feb 12, 2024
…SIC (#3158)

This PR #3099 fixes the case where on chassis Linecard there are no BGP neighbors. However, if the Linecard has neighbors on one ASIC but not on other, the command show bgp summary displayed no neighbors. This PR fixes this.

How I did it
Add check in bgp_util to create empty peer list only once
Add UT to cover this case
mssonicbld pushed a commit to mssonicbld/sonic-utilities that referenced this pull request Apr 26, 2024
…SIC (sonic-net#3158)

This PR sonic-net#3099 fixes the case where on chassis Linecard there are no BGP neighbors. However, if the Linecard has neighbors on one ASIC but not on other, the command show bgp summary displayed no neighbors. This PR fixes this.

How I did it
Add check in bgp_util to create empty peer list only once
Add UT to cover this case
mssonicbld pushed a commit that referenced this pull request Apr 26, 2024
…SIC (#3158)

This PR #3099 fixes the case where on chassis Linecard there are no BGP neighbors. However, if the Linecard has neighbors on one ASIC but not on other, the command show bgp summary displayed no neighbors. This PR fixes this.

How I did it
Add check in bgp_util to create empty peer list only once
Add UT to cover this case
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[chassis] show ip bgp summary fails on chassis linecards with no eBGP neighbors
7 participants