cisco nxos bgp neighbor defect fix #505
Merged
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.
ISSUE TYPE
COMPONENT
cisco_nxos_show_ip_bgp_neighbors.template
SUMMARY
There is a bug in the current template due to which BGP neighbors in the downstate are NOT recorded/templated properly. Also, any neighbor entry following a BGP downstate neighbor entry gets wrongly templated.
Story:
There are 5 BGP neighbors in down state in "cisco_nxos_show_ip_bgp_neighbors.raw"
However, the parsed file only has 4x of them in "cisco_nxos_show_ip_bgp_neighbors.parsed"
The neighbor which is missing is 47.48.246.179, and is primarily because of the current ruleset definitions in the "cisco_nxos_show_ip_bgp_neighbors.template".
The template currently sets recording at:
Whereas, a neighbor in the downstate does NOT have "End of RIB" and neither does it have local/remote {IP/PORT} lines obviously.
A BGP neighbor in downstate ends at:
From the list of all down neighbors, why only entry for "neighbor 47.48.246.179" is missing from the ".parsed" file?
It is because the entry for "47.48.246.179" immediately follows the BGP entry for another DOWN neighbor 202.77.85.157. This causes incorrect parsing/recording of the existing bgp neighbor .raw data. It further causes incorrect state transitions for "BGP neighbor 217.90.29.79" which immediately follows the 2x down neighbor entries.
Fix:
The explicit ruleset for catching "No established BGP session with peer" with Record Start entry has been added at the end.
After the change:
All of the down neighbor entries are now parsed OK, along with entries following the downed neighbors.