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

staticd: correct table-id handling for static routes. #7844

Merged
merged 3 commits into from
Jan 15, 2021

Conversation

vishaldhingra
Copy link
Contributor

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]

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>
@LabN-CI
Copy link
Collaborator

LabN-CI commented Jan 10, 2021

Outdated results 💚

Basic BGPD CI results: SUCCESS, 0 tests failed

_ _
Result SUCCESS git merge/7844 433d59f
Date 01/10/2021
Start 03:20:45
Finish 03:56:01
Run-Time 35:16
Total 1815
Pass 1815
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2021-01-10-03:20:45.txt
Log autoscript-2021-01-10-03:21:44.log.bz2
Memory 492 481 428

For details, please contact louberger

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Jan 10, 2021

Continuous Integration Result: SUCCESSFUL

Continuous Integration Result: SUCCESSFUL

Congratulations, 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.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Warnings Generated during build:

Debian 10 amd64 build: Successful with additional warnings

Debian Package lintian failed for Debian 10 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-16412/artifact/DEB10BUILD/ErrorLog/log_lintian.txt)

W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.5.0.3 (current is 4.3.0)
W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.5.0.3 (current is 4.3.0)
W: frr: changelog-file-missing-explicit-entry 7.5-0 -> 7.6-dev-20210110-02-g433d59fe2-0 (missing) -> 7.6-dev-20210110-02-g433d59fe2-0~deb10u1
W: frr-rpki-rtrlib: changelog-file-missing-explicit-entry 7.5-0 -> 7.6-dev-20210110-02-g433d59fe2-0 (missing) -> 7.6-dev-20210110-02-g433d59fe2-0~deb10u1
W: frr-snmp: changelog-file-missing-explicit-entry 7.5-0 -> 7.6-dev-20210110-02-g433d59fe2-0 (missing) -> 7.6-dev-20210110-02-g433d59fe2-0~deb10u1
W: frr-pythontools: changelog-file-missing-explicit-entry 7.5-0 -> 7.6-dev-20210110-02-g433d59fe2-0 (missing) -> 7.6-dev-20210110-02-g433d59fe2-0~deb10u1
W: frr-doc: changelog-file-missing-explicit-entry 7.5-0 -> 7.6-dev-20210110-02-g433d59fe2-0 (missing) -> 7.6-dev-20210110-02-g433d59fe2-0~deb10u1

&& !vrf_is_backend_netns()) {
snprintf(
args->errmsg, args->errmsg_len,
"%% table param only available when running on netns-based vrfs");
Copy link
Contributor

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?

Copy link
Member

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.

Copy link
Contributor Author

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)]

Copy link
Member

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.

Copy link
Contributor

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?

Copy link
Contributor Author

@vishaldhingra vishaldhingra Jan 12, 2021

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.

Copy link
Contributor

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"

Copy link
Contributor Author

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, Thanks @mjstapp and @sworleys for your review.

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>
@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, 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.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Warnings Generated during build:

Debian 10 amd64 build: Successful with additional warnings

Debian Package lintian failed for Debian 10 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-16483/artifact/DEB10BUILD/ErrorLog/log_lintian.txt)

W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.5.0.3 (current is 4.3.0)
W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.5.0.3 (current is 4.3.0)
W: frr-snmp: changelog-file-missing-explicit-entry 7.5-0 -> 7.6-dev-20210112-00-gef4b6b223-0 (missing) -> 7.6-dev-20210112-00-gef4b6b223-0~deb10u1
W: frr-pythontools: changelog-file-missing-explicit-entry 7.5-0 -> 7.6-dev-20210112-00-gef4b6b223-0 (missing) -> 7.6-dev-20210112-00-gef4b6b223-0~deb10u1
W: frr-doc: changelog-file-missing-explicit-entry 7.5-0 -> 7.6-dev-20210112-00-gef4b6b223-0 (missing) -> 7.6-dev-20210112-00-gef4b6b223-0~deb10u1
W: frr: changelog-file-missing-explicit-entry 7.5-0 -> 7.6-dev-20210112-00-gef4b6b223-0 (missing) -> 7.6-dev-20210112-00-gef4b6b223-0~deb10u1
W: frr-rpki-rtrlib: changelog-file-missing-explicit-entry 7.5-0 -> 7.6-dev-20210112-00-gef4b6b223-0 (missing) -> 7.6-dev-20210112-00-gef4b6b223-0~deb10u1

@LabN-CI
Copy link
Collaborator

LabN-CI commented Jan 12, 2021

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/7844 ef4b6b2
Date 01/12/2021
Start 17:54:49
Finish 18:30:03
Run-Time 35:14
Total 1815
Pass 1815
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2021-01-12-17:54:49.txt
Log autoscript-2021-01-12-17:55:45.log.bz2
Memory 482 486 421

For details, please contact louberger

Copy link
Contributor

@mjstapp mjstapp left a 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

@sworleys
Copy link
Member

does this need to be backported?

@vishaldhingra
Copy link
Contributor Author

does this need to be backported?

yes, do I need to raise separate PR ?

@mjstapp
Copy link
Contributor

mjstapp commented Jan 14, 2021

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants