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
Member

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

@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
Copy link
Member Author

sworleys commented Oct 17, 2019

Fixes #4535

@LabN-CI
Copy link
Collaborator

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
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-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
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-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 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
Copy link
Collaborator

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

Choose a reason for hiding this comment

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

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

Thanks for the explanations - looks good to me.

@LabN-CI
Copy link
Collaborator

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

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.

None yet

5 participants