-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Bugtool: route tables dynamically dumped #14488
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
Conversation
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 great, thanks for the PR! One suggestion to try out below, otherwise LGTM.
ac11725
to
20051bd
Compare
When using the Bugtool with "direct routing / native routing mode" enabled, we are only getting the encryption and proxy tables (200 / 2005). The goal of this PR is to get the route tables dynamically and remove the hardcoded ones. Fixes: cilium#12250 Signed-off-by: Youssef Azrak yazrak.tech@gmail.com
20051bd
to
62ecdb0
Compare
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.
Thanks 💯
// routeCommands gets the routes tables dynamically. | ||
func routeCommands() []string { | ||
commands := []string{} | ||
routes, _ := execCommand("ip route show table all | grep -E --only-matching 'table [0-9]+'") |
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.
@youssefazrak does this mean we won't dump from tables like table local
/ table main
? I guess table main
is already handled by the "ip -4 r"
case above, but could table local
also have relevant information?
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.
Hey @joestringer Indeed that is my understanding. ip -4 r
drop the table main
but not table local
.
The local
routes of the table local
are the routes to a locally hosted IP, basically the L3 interfaces' IPs. We already have this output from the ip a
command.
The broadcast
part for the broadcast addresses but this is also given by ip a
.
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.
OK, that sounds reasonable to me. Thanks for the clarification!
Proposing this PR for backport to 1.8 and 1.9 as it provides helpful debugging information that is equally relevant to older versions. |
@twpayne any pointers on how to put the PR for backport to 1.8/1.9? |
When using the Bugtool with "direct routing / native routing mode" enabled, we are only getting the encryption and proxy tables (200 / 2005).
The goal of this PR is to get the route tables dynamically and remove the hardcoded ones.
Signed-off-by: Youssef Azrak yazrak.tech@gmail.com
Fixes: #12250