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

zebra: Rib Update Event Scheduler For Un-managed Routes, etc. #5184

Merged
merged 3 commits into from Oct 19, 2019

Conversation

@sworleys
Copy link
Contributor

sworleys commented Oct 17, 2019

This patch extends the rib_update() api to be scheduled as events on the zrouter.master rather than processing them immediately.

Certain situations exists when we need to do a batch process of all the routes in the rib.

One such example is System/Kernel routes. Since they are not owned by any daemon, its zebra's job to manage them in its rib. This was not really a problem until recently when the kernel decided to stop sending route delete messages when routes become unreachable (interface down/addr del events).

As such, at least in the linux case, we need to re-process all the kernel routes to verify they are still reachable.

@polychaeta polychaeta added the zebra label Oct 17, 2019
@sworleys sworleys force-pushed the sworleys:Kernel-Route-Update branch from af8ee1b to 3f3dc6e Oct 17, 2019
@sworleys sworleys changed the title [WIP] zebra: Batch Rib Update Event Scheduler For Un-managed Routes, etc. [WIP] zebra: Rib Update Event Scheduler For Un-managed Routes, etc. Oct 17, 2019
@sworleys

This comment has been minimized.

Copy link
Contributor Author

sworleys commented Oct 17, 2019

Fixes #4535

@LabN-CI

This comment has been minimized.

Copy link

LabN-CI commented Oct 17, 2019

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/5184 3f3dc6e
Date 10/17/2019
Start 17:50:26
Finish 18:12:11
Run-Time 21:45
Total 1815
Pass 1815
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2019-10-17-17:50:26.txt
Log autoscript-2019-10-17-17:51:21.log.bz2
Memory 428 430 360

For details, please contact louberger

@NetDEF-CI

This comment has been minimized.

Copy link
Collaborator

NetDEF-CI commented Oct 17, 2019

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-9297/

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.

@NetDEF-CI

This comment has been minimized.

Copy link
Collaborator

NetDEF-CI commented Oct 18, 2019

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-9296/

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.


CLANG Static Analyzer Summary

  • Github Pull Request 5184, comparing to Git base SHA 0997ca9

No Changes in Static Analysis warnings compared to base

2 Static Analyzer issues remaining.

See details at
https://ci1.netdef.org/browse/FRR-FRRPULLREQ-9296/artifact/shared/static_analysis/index.html

@sworleys sworleys force-pushed the sworleys:Kernel-Route-Update branch from 3f3dc6e to 822c600 Oct 18, 2019
@sworleys sworleys changed the title [WIP] zebra: Rib Update Event Scheduler For Un-managed Routes, etc. zebra: Rib Update Event Scheduler For Un-managed Routes, etc. Oct 18, 2019
@LabN-CI

This comment has been minimized.

Copy link

LabN-CI commented Oct 18, 2019

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/5184 822c600
Date 10/18/2019
Start 12:15:24
Finish 12:37:12
Run-Time 21:48
Total 1815
Pass 1815
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2019-10-18-12:15:24.txt
Log autoscript-2019-10-18-12:16:18.log.bz2
Memory 422 437 351

For details, please contact louberger

@NetDEF-CI

This comment has been minimized.

Copy link
Collaborator

NetDEF-CI commented Oct 18, 2019

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-9318/

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.

Copy link
Contributor

mjstapp left a comment

I think the overall idea of making this a scheduled 'event' is great - but I did have a couple of questions

zebra/if_netlink.c Show resolved Hide resolved
zebra/zebra_rib.c Outdated Show resolved Hide resolved
zebra/zebra_nhg.c Show resolved Hide resolved
sworleys added 3 commits Oct 17, 2019
If we need to batch process the rib (all tables or specific
vrf), do so as a scheduled thread event rather than immediately
handling it. Further, add context to the events so that you
narrow down to certain route types you want to reprocess.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
We can assume that system/kernel routes are valid indeed
if this is our first time procesing them. But since we don't
get explicit deletion events for kernel routes anymore, we
have to be prepared to process them if the nexthop becomes
unreachable for instance. Therefore, if the route is not NEW,
then don't assume its valid.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
Since we don't have a daemon who's job is to handle kernel
routes and we don't get an explicit route delete anymore if
nexthops become unreachable from the kernel, zebra must
re-process kernel routes itself to make sure they are still valid.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
@sworleys sworleys force-pushed the sworleys:Kernel-Route-Update branch from 822c600 to 2a18114 Oct 18, 2019
Copy link
Contributor

mjstapp left a comment

Thanks for the explanations - looks good to me.

@LabN-CI

This comment has been minimized.

Copy link

LabN-CI commented Oct 18, 2019

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/5184 2a18114
Date 10/18/2019
Start 17:05:23
Finish 17:26:55
Run-Time 21:32
Total 1815
Pass 1815
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2019-10-18-17:05:23.txt
Log autoscript-2019-10-18-17:06:12.log.bz2
Memory 425 431 360

For details, please contact louberger

@NetDEF-CI

This comment has been minimized.

Copy link
Collaborator

NetDEF-CI commented Oct 18, 2019

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-9320/

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.

@mjstapp mjstapp merged commit 0a76412 into FRRouting:master Oct 19, 2019
2 checks passed
2 checks passed
ci/dockercloud (/tests/topotests) Your tests passed in Docker Cloud
Details
default Tested by NetDEF/OpenSourceRouting CI System
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.