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

BGP TSA/B/C : Handler error message seen with TSB command. #7171

Merged
merged 1 commit into from
Apr 8, 2021

Conversation

judyjoseph
Copy link
Contributor

@judyjoseph judyjoseph commented Mar 28, 2021

Why I did it

With the latest 201911 image, the following error was seen on staging devices with TSB command ( for both single asic, multi asic ). Though this err message doesn't affect the TSB functionality, it is good to fix.

admin@STG01-0101-0102-01T1:~$ TSB
BGP0 : % Could not find route-map entry TO_TIER0_V4 20
line 1: Failure to communicate[13] to zebra, line: no route-map TO_TIER0_V4 permit 20

% Could not find route-map entry TO_TIER0_V4 30
line 2: Failure to communicate[13] to zebra, line: no route-map TO_TIER0_V4 deny 30

In addition, in this PR I am fixing the message displayed to user when there are no BGP neighbors configured on that BGP instance. In multi-asic device there could be case where there are no BGP neighbors configured on a particular ASIC (in BGP2 in below example). The message displayed to user don't convey the correct action

admin@STG01-0101-0102-01T1:~$ TSA
BGP0 : System Mode: Normal -> Maintenance
BGP1 : System Mode: Normal -> Maintenance
BGP2 : System is already in Maintenance mode      ---- this message don't seem to convey correct action.
BGP3 : System Mode: Normal -> Maintenance
admin@STG01-0101-0102-01T1:~$ TSC
BGP0 : System Mode: Maintenance
BGP1 : System Mode: Maintenance
BGP2 : System Mode: Normal                         ---- this message don't seem to convey correct action.
BGP3 : System Mode: Maintenance
admin@STG01-0101-0102-01T1:~$ TSB
BGP0 : System Mode: Maintenance -> Normal
BGP1 : System Mode: Maintenance -> Normal
BGP2 : System is already in Normal mode           ---- this message don't seem to convey correct action.
BGP3 : System Mode: Maintenance -> Normal

How I did it

The error message started coming with the use of multiple Deployment ID's and all use the same route-map TO_TIER0_V4 out as shown below. The way TSA/B works is by checking for routemaps configured in out direction - and hence there is a duplicate here. To fix add uniq check to make sure we are working with unique route-map names.

  neighbor TIER0_V4_DEPLOYMENT_ID_19 activate
  neighbor TIER0_V4_DEPLOYMENT_ID_19 soft-reconfiguration inbound
  neighbor TIER0_V4_DEPLOYMENT_ID_19 maximum-prefix 12000 90 warning-only
  neighbor TIER0_V4_DEPLOYMENT_ID_19 route-map FROM_TIER0_V4_DEPLOYMENT_ID_19 in
  neighbor TIER0_V4_DEPLOYMENT_ID_19 route-map TO_TIER0_V4 out             <<<<<<<<<<<<<<<<<
  neighbor TIER0_V4_DEPLOYMENT_ID_4 activate
  neighbor TIER0_V4_DEPLOYMENT_ID_4 soft-reconfiguration inbound
  neighbor TIER0_V4_DEPLOYMENT_ID_4 maximum-prefix 12000 90 warning-only
  neighbor TIER0_V4_DEPLOYMENT_ID_4 route-map FROM_TIER0_V4_DEPLOYMENT_ID_4 in
  neighbor TIER0_V4_DEPLOYMENT_ID_4 route-map TO_TIER0_V4 out             <<<<<<<<<<<<<<<<<

To fix the message displayed to user when there are no BGP neighbors configured on that BGP instance, a new message "BGP2 : System Mode: No external neighbors" is introduced to let users know of this scenario.

Plan to update the sonic-mgmt tests to cover this case as well.

How to verify it

  1. The error message is no more seen with TSB
  2. The new message "System Mode: No external neighbors" is shown as the BGP2 instance don't have any external BGP neighbors present.
admin@STG01-0101-0102-01T1:~$ TSA
BGP0 : System Mode: Normal -> Maintenance
BGP1 : System Mode: Normal -> Maintenance
BGP2 : System Mode: No external neighbors
BGP3 : System Mode: Normal -> Maintenance
admin@STG01-0101-0102-01T1:~$ TSC
BGP0 : System Mode: Maintenance
BGP1 : System Mode: Maintenance
BGP2 : System Mode: No external neighbors
BGP3 : System Mode: Maintenance
admin@STG01-0101-0102-01T1:~$ TSB
BGP0 : System Mode: Maintenance -> Normal
BGP1 : System Mode: Maintenance -> Normal
BGP2 : System Mode: No external neighbors
BGP3 : System Mode: Maintenance -> Normal

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

  • 201811
  • 201911
  • 202006
  • 202012

Description for the changelog

A picture of a cute animal (not mandatory but encouraged)

@judyjoseph judyjoseph requested a review from lguohan as a code owner March 28, 2021 00:52
@judyjoseph
Copy link
Contributor Author

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@judyjoseph judyjoseph changed the title BGP TSA/B/C : Handle additional scenario's seen in staging devices BGP TSA/B/C : Handler error message seen with TSB command. Mar 28, 2021
@judyjoseph judyjoseph requested review from abdosi and rlhui March 28, 2021 06:24
@judyjoseph judyjoseph merged commit 1ad5dbe into sonic-net:master Apr 8, 2021
abdosi pushed a commit that referenced this pull request Apr 8, 2021
With the latest 201911 image, the following error was seen on staging devices with TSB command ( for both single asic, multi asic ). Though this err message doesn't affect the TSB functionality, it is good to fix.

admin@STG01-0101-0102-01T1:~$ TSB
BGP0 : % Could not find route-map entry TO_TIER0_V4 20
line 1: Failure to communicate[13] to zebra, line: no route-map TO_TIER0_V4 permit 20
% Could not find route-map entry TO_TIER0_V4 30
line 2: Failure to communicate[13] to zebra, line: no route-map TO_TIER0_V4 deny 30

In addition, in this PR I am fixing the message displayed to user when there are no BGP neighbors configured on that BGP instance. In multi-asic device there could be case where there are no BGP neighbors configured on a particular ASIC.
@judyjoseph judyjoseph deleted the bgp_tsabc_fix branch April 19, 2021 14:56
@daall
Copy link
Contributor

daall commented Apr 30, 2021

@judyjoseph we need this change for the sonic-mgmt tests to work w/ the 202012 image, could you please submit a PR against the 202012 branch as this did not cherry-pick cleanly

lguohan pushed a commit to lguohan/sonic-buildimage that referenced this pull request May 3, 2021
With the latest 201911 image, the following error was seen on staging devices with TSB command ( for both single asic, multi asic ). Though this err message doesn't affect the TSB functionality, it is good to fix.

admin@STG01-0101-0102-01T1:~$ TSB
BGP0 : % Could not find route-map entry TO_TIER0_V4 20
line 1: Failure to communicate[13] to zebra, line: no route-map TO_TIER0_V4 permit 20
% Could not find route-map entry TO_TIER0_V4 30
line 2: Failure to communicate[13] to zebra, line: no route-map TO_TIER0_V4 deny 30

In addition, in this PR I am fixing the message displayed to user when there are no BGP neighbors configured on that BGP instance. In multi-asic device there could be case where there are no BGP neighbors configured on a particular ASIC.
daall pushed a commit that referenced this pull request May 3, 2021
With the latest 201911 image, the following error was seen on staging devices with TSB command ( for both single asic, multi asic ). Though this err message doesn't affect the TSB functionality, it is good to fix.

admin@STG01-0101-0102-01T1:~$ TSB
BGP0 : % Could not find route-map entry TO_TIER0_V4 20
line 1: Failure to communicate[13] to zebra, line: no route-map TO_TIER0_V4 permit 20
% Could not find route-map entry TO_TIER0_V4 30
line 2: Failure to communicate[13] to zebra, line: no route-map TO_TIER0_V4 deny 30

In addition, in this PR I am fixing the message displayed to user when there are no BGP neighbors configured on that BGP instance. In multi-asic device there could be case where there are no BGP neighbors configured on a particular ASIC.
raphaelt-nvidia pushed a commit to raphaelt-nvidia/sonic-buildimage that referenced this pull request May 23, 2021
With the latest 201911 image, the following error was seen on staging devices with TSB command ( for both single asic, multi asic ). Though this err message doesn't affect the TSB functionality, it is good to fix.

admin@STG01-0101-0102-01T1:~$ TSB
BGP0 : % Could not find route-map entry TO_TIER0_V4 20
line 1: Failure to communicate[13] to zebra, line: no route-map TO_TIER0_V4 permit 20
% Could not find route-map entry TO_TIER0_V4 30
line 2: Failure to communicate[13] to zebra, line: no route-map TO_TIER0_V4 deny 30

In addition, in this PR I am fixing the message displayed to user when there are no BGP neighbors configured on that BGP instance. In multi-asic device there could be case where there are no BGP neighbors configured on a particular ASIC.
carl-nokia pushed a commit to carl-nokia/sonic-buildimage that referenced this pull request Aug 7, 2021
With the latest 201911 image, the following error was seen on staging devices with TSB command ( for both single asic, multi asic ). Though this err message doesn't affect the TSB functionality, it is good to fix.

admin@STG01-0101-0102-01T1:~$ TSB
BGP0 : % Could not find route-map entry TO_TIER0_V4 20
line 1: Failure to communicate[13] to zebra, line: no route-map TO_TIER0_V4 permit 20
% Could not find route-map entry TO_TIER0_V4 30
line 2: Failure to communicate[13] to zebra, line: no route-map TO_TIER0_V4 deny 30

In addition, in this PR I am fixing the message displayed to user when there are no BGP neighbors configured on that BGP instance. In multi-asic device there could be case where there are no BGP neighbors configured on a particular ASIC.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants