Tests for VNET route precedence over BGP learnt route. #15710
+1,306
−33
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.
Description of PR
These tests check the Vnet route precedence over bgp learnt route.
Summary:
Fixes # (issue)
Type of change
Back port request
Approach
What is the motivation for this PR?
Currently if a route is learnt via BGP and added into the hardware, adding a VNET route results in failure. In addition due to a bug in VnetOrch, we start advertising the failed route, This prompts the BGP to remove the learnt route in favor of the local route. Since the Vnet Orch doesn't retry adding the Vnet route, This results in no route being present in the Hardware.
How I verified it
The fix is in PR sonic-net/sonic-swss#3345
These tests cover various scenario in which VNET and BGP routes are added and removed in different order
How did you do it?
How did you verify/test it?
Any platform specific information?
Cisco-8000 and mlnx.
Supported testbed topology if it's a new test case?
Documentation
There are 5 differnet scenarios which are checked. Each scenario is tested with with the following options.
Encap types [v4_inv4, v6_inV4]
Monitor Type [BFD, Custom]
Init NH state( BFD/monitor sessions for nexthops are initially up or not.)
ADD BGP ROUTE on TOR
Add VNET route
Configure monitor (BFD or custom) with nexthop state (UP)
Test with traffic
Remove VNET route
Remove BGP route
Add VNET route
Configure monitor (BFD or custom) with nexthop state (UP)
Add BGP ROUTE on TOR
Test with traffic
Remove VNET ROUTE
Remove BGP route
ADD BGP ROUTE on TOR
Add VNET route
Remove BGP route
Configure monitor (BFD or custom) with nexthop state (UP)
Test with traffic
Remove VNET route
Add VNET route
Add BGP ROUTE on TOR
Configure monitor (BFD or custom) with nexthop state (UP)
Test with traffic
Remove BGP route
Test with traffic
Remove VNET route
ADD BGP ROUTE on TOR
Add VNET route
Configure monitor (BFD or custom) with nexthop state (UP)
Test with traffic
flap the bfd/monitor sessions.
Test with traffic
Remove VNET route
Remove BGP route
Note: Some scenarios are skipped because they are not valid.