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

Routemap debugging #12796

Merged
merged 11 commits into from
Feb 14, 2023
Merged

Routemap debugging #12796

merged 11 commits into from
Feb 14, 2023

Conversation

donaldsharp
Copy link
Member

See individual commits but end goal is to see stuff like this:

2023-02-13 09:38:11.332 [DEBG] zebra: [YY2TN-VKBG5] Importing routes from table 33
2023-02-13 09:38:11.332 [DEBG] zebra: [KC1TZ-DAY7N] route_match_ip_next_hop: Access-List Specified: 192.168.119.33 does not exist defaulting to NO_MATCH
2023-02-13 09:38:11.332 [DEBG] zebra: [KZK58-6T4Y6] No best match sequence for pfx: 1.2.3.4/32 in route-map: FAILURE, result: no match
2023-02-13 09:38:11.332 [DEBG] zebra: [H5AW4-JFYQC] Route-map: FAILURE, prefix: 1.2.3.4/32, result: deny
2023-02-13 09:38:11.332 [DEBG] zebra: [KC1TZ-DAY7N] route_match_ip_next_hop: Access-List Specified: 192.168.119.33 does not exist defaulting to NO_MATCH
2023-02-13 09:38:11.332 [DEBG] zebra: [KZK58-6T4Y6] No best match sequence for pfx: 1.3.4.5/32 in route-map: FAILURE, result: no match
2023-02-13 09:38:11.332 [DEBG] zebra: [H5AW4-JFYQC] Route-map: FAILURE, prefix: 1.3.4.5/32, result: deny
2023-02-13 09:38:11.332 [DEBG] zebra: [KC1TZ-DAY7N] route_match_ip_next_hop: Access-List Specified: 192.168.119.33 does not exist defaulting to NO_MATCH
2023-02-13 09:38:11.332 [DEBG] zebra: [KZK58-6T4Y6] No best match sequence for pfx: 1.3.4.6/32 in route-map: FAILURE, result: no match
2023-02-13 09:38:11.332 [DEBG] zebra: [H5AW4-JFYQC] Route-map: FAILURE, prefix: 1.3.4.6/32, result: deny
2023-02-13 09:38:11.332 [DEBG] zebra: [KC1TZ-DAY7N] route_match_ip_next_hop: Access-List Specified: 192.168.119.33 does not exist defaulting to NO_MATCH
2023-02-13 09:38:11.332 [DEBG] zebra: [KZK58-6T4Y6] No best match sequence for pfx: 1.3.4.7/32 in route-map: FAILURE, result: no match
!
route-map FAILURE permit 10
 match ip next-hop 192.168.119.33
exit
!

Effectively I spent a bunch of time tracking down why the ip address I was using was not matching the nexthop. Turns out that I had specified a accesslist instead of an ip address and it took me forever to figure it out. Debug routemap gives no clue as to what is going on with the system. So I was left with manual debugging w/ gdb. How can an operator figure this out?

Let's make it easier to debug instead of guessing

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
When using `match ip[v6] next-hop <Access-list>` warn
when creating the access-list that the access list does
not yet exist and nothing can be done with it yet.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Change the bool to a uint32_t and setup a flag to test
for and set against.  Future commits will allow
a debug detail which should be used by match/set statements
to give further context of what is going on.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Add the ability to turn on `debug routemap detail` for FRR.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Let's give the operator some inkling as to why a routemap is
not working the way they thing it should be when something
goes wrong using it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
When a routemap lookup of the prefix fails, add some useful data to
the end operator about what has just gone wrong when they are
using `debug routemap detail`

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
When using access-list and the access-list is not specified
let's give the operator some clue about what is going on.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
@donaldsharp
Copy link
Member Author

All in all I hit the major bits of FRR(bgp, ospf and zebra) for access-list and prefix-list lookup failures.

@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-PULLREQ2-9641/

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.

@riw777 riw777 self-requested a review February 14, 2023 14:33
Copy link
Member

@riw777 riw777 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

@riw777 riw777 merged commit bb7f023 into FRRouting:master Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants