-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
staticd: correct table-id handling for static routes. #7844
Conversation
modified the yang model for path-list. table-id should be a key, as one route can have multiple table-ids. Signed-off-by: vishaldhingra <vdhingra@vmware.com>
updated callback methods based on autogenerated code. Signed-off-by: vishaldhingra <vdhingra@vmware.com>
Outdated results 💚Basic BGPD CI results: SUCCESS, 0 tests failed
For details, please contact louberger |
Continuous Integration Result: SUCCESSFULContinuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-16412/ This is a comment from an automated CI system. Warnings Generated during build:Debian 10 amd64 build: Successful with additional warningsDebian Package lintian failed for Debian 10 amd64 build:
|
&& !vrf_is_backend_netns()) { | ||
snprintf( | ||
args->errmsg, args->errmsg_len, | ||
"%% table param only available when running on netns-based vrfs"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm - I think specifying the table for a route has been supported. is this new - is there a reason to impose this restriction?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea this shouldn't be restricted. vrf_netns or vrf-lite, people should be allowed to install routes to whatever tables they want with staticd.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the context of below PR, we had a discussion and we agreed on above check.
[(https://github.com//pull/7329)]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh is this an instance where we have both VRF and table ID? You may be right to disallow then.
Specifically, a user should be able to do ip route 1.1.1.1/32 2.2.2.2 table 1001
regardless of vrf-netns or vrf-lite.
as long as they can still do the above, I am fine with it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe it would be clearer if the ordering of the tests in that block were different: test for the presence of a vrf first then test for a table_id and not-netns, to identify the invalid case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mjstapp : We need to test this only, when there is a valid tableId(Here valid means > 0).
This API gets called even when tableId is zero. So It's better we should check tableId first.
In the other case we are keep on executing vrf check, even when tableId is zero.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so ... it sounds as if you think there's a performance problem - but of course, since this is config and yang and nb and we know that is very slow, it's hard to imagine that making the intent of this block clearer is really going to have a performance impact?
if you don't want to change the order, then we need a comment - since two of us had trouble decoding the intent of the tests? "table id and vrf together allowed only for netns vrf backend"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure Mark, I will add the comment.
Yang and NB are slow, agreed, But we are doing our best to achieve scale.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
problem: table-id gets overwritten for a given route. RCA: table-id was getting overwritten from the NB layer, So route was getting installed with the latest table-id. Fix: make the table-id as the key in the NB layer. This will program the route in zebra correctly. - Removed the table-id modify callbacks. - Moved the validate and apply table-id changes to path-list creation issue FRRouting#7347 Signed-off-by: vishaldhingra <vdhingra@vmware.com>
Continuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-16483/ This is a comment from an automated CI system. Warnings Generated during build:Debian 10 amd64 build: Successful with additional warningsDebian Package lintian failed for Debian 10 amd64 build:
|
💚 Basic BGPD CI results: SUCCESS, 0 tests failedResults table
For details, please contact louberger |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me now
does this need to be backported? |
yes, do I need to raise separate PR ? |
Yes, we'll need another PR for the 7.5 branch. but the review process is usually quick... |
I have added the regression for table-id handling, while submitting yang changes.
This PR is about to fix this problem.
Issue
[https://github.com//issues/7806]