-
Notifications
You must be signed in to change notification settings - Fork 698
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
How to use ListPath
to get OpenConfig BGP RIB information?
#2765
Comments
ListPath
usageListPath
to get OpenConfig BGP RIB information?
In the case of the global rib (not route server case), adj-in -> in-filter -> the global rib -> out-filter -> adj-out
|
Hi Fujita, this is also what I first assumed and tried in "Case/Attempt 1" above, but I observed that it didn't work. See the test failures here: #2764 -- I tried all the permutations of |
Very sorry about the delay. |
What you just described is actually the behaviour I want -- the issue is that I'm not seeing the same thing. In particular the community attributes at adj-rib-in-post cannot be populated by any flag permutation. |
The current API doesn't provide routes between in-filter and the global rib because the CLI doesn't need to provide such. |
Currently, even though `ApplyPolicy` is called for determining the accepted routes after apply policy, the new route with attribute modifications is not returned. This is problematic for gRPC API users. Tests are added for all four cases that were described in osrg#2765. This PR makes the behaviour correct for "Case/Attempt 2" described in the issue.
I still think the API was intended to get what I wanted, but because the CLI was the primary use case that's why the community attributes weren't populated correctly. Opened #2784 to fix this and make the behaviour conform to "Case/Attempt 2" described above. |
Even though the semantics is still confusing, "Case/Attempt 2" is now working so the requested behaviour is now possible. I'll consider this closed. |
TLDR: The API behaviour of
ListPath
is hard to understand. After experimentation I can't get the correct information to populate OpenConfig BGP RIB schema. Specifically,ListPath
may be incorrectly populating path attributes for post-policy ADJ_IN.Ask: Requesting guidance on how to use or improve this API to get pre/post-policy ADJ_IN/ADJ_OUT RIB information.
Background
I'm using
ListPath
withADJ_IN
andADJ_OUT
to get the BGP RIB for the following types of RIBs:The use case is to populate the BGP RIBs defined in OpenConfig.
Problem
At first, the
EnableFiltered
parameter seems to do what I want: it applies the policies, and marks each route as either "filtered", (or rejected).Case/Attempt 1
So I did this:
ListPath
withEnableFiltered=false
, and use all routesListPath
withEnableFiltered=true
, and use routes whereroute.Filtered=false
ListPath
withEnableFiltered=false
, and use all routesListPath
withEnableFiltered=true
, and use routes whereroute.Filtered=false
Observations
Case/Attempt 2
So now I tried flipping
EnableFiltered
for adj-rib-out-*:ListPath
withEnableFiltered=false
, and use all routes.ListPath
withEnableFiltered=true
, and use routes whereroute.Filtered=false
.ListPath
withEnableFiltered=true
, and use all routes.ListPath
withEnableFiltered=false
, and use routes whereroute.Filtered=false
.Observations
Case 2 is tested here: #2764, which shows the incorrect adj-rib-in-post results (last added test case)
Case/Attempt 3
So now I tried flipping
EnableFiltered
for adj-rib-in-* as well:ListPath
withEnableFiltered=true
, and use all routes.ListPath
withEnableFiltered=false
, and use routes whereroute.Filtered=false
.ListPath
withEnableFiltered=true
, and use all routes.ListPath
withEnableFiltered=false
, and use routes whereroute.Filtered=false
.Observations
Based on the above Case 2 was the closest the behaviour I expected., but for ADJ_IN, the community attribute of the IMPORT policy was not being applied.
I tried to understand the code at
gobgp/pkg/server/server.go
Lines 2614 to 2645 in 8fdda5d
Requesting guidance on how to use or improve this API to get pre/post-policy ADJ_IN/ADJ_OUT RIB information.
The text was updated successfully, but these errors were encountered: