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
docs: Document --debug-verbose=datapath
in debugging datapath section
#16022
docs: Document --debug-verbose=datapath
in debugging datapath section
#16022
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.
Thanks for the doc update!
Please find some feedback below.
Note also that you're using Markdown-style single backquotes to mark inline literals, but RST uses double backquotes. If you wanted to preview the changes, you can generate the HTML document locally with make -C Documentation live-preview
.
--debug-verbose=datapath
in debugging datapath section
ea81729
to
fdd21ab
Compare
@qmonnet, thanks for your comments. Let me know if you have more suggestions! |
e8a6d06
to
7666a1c
Compare
7666a1c
to
d40a38c
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! A few comments:
-
I think
cilium_dbg()
should be the preferred method overprintk()
, because we already have many calls in place in the code, and it integrates well incilium monitor
whereasprintk()
logs may be harder to track in the datapath flow. Plusprintk()
is supposed to have lower performance. So I would mentioncilium monitor
/cilium_dbg()
first, andbpftool prog tracelog
/printk()
last. -
--debug
and--debug-verbose=datapath
are not equivalent. I suspect (but didn't check) that the later also sets the former. My understanding is that--debug-verbose=datapath
also defines theLB_DEBUG
macros used in bpf/lib/lb.h to provide additional logs about the load-balancer. But I do not believe theseLB_DEBUG
macros condition the usage of eithercilium_dbg()
orprintk()
. -
By the way,
cilium config debug=true
does not seem to enableDebugLB
, like--debug-verbose=datapath
does. I think thatcilium config debugLB=true
is needed (but conversely, this won't setDebug
).
Overall it is not clear when to use printk()
or cilium_dbg()
. I'm not sure there is a clear answer to that, I think cilium_dbg()
should be favoured, but the more “traditional” printk()
method remains available for developers who prefer to handle their debug logs outside of cilium monitor
's framework.
I would also try to make the distinction between functions and options more explicit. I do understand the paragraph because I know what the options or debug functions do, but it would be more accessible, I think, if we stated explicitly that:
- There are options to print logs from the datapath with
cilium monitor
: ... - There are options to get even more logs, for the load-balancer: ...
- Depending on which options are enabled, developers can also add their own debug messages. Two functions are available:
cilium_dbg()
andprintk()
, they behave differently and their output should be retrieved differently and blah blah blah.
What do you think?
[Asking a review from Joe who may have some valuable input here.]
--debug-verbose=datapath enables the datapath DEBUG option (via
(Plus later the |
490b008
to
7346708
Compare
6aec9f5
to
97d2f88
Compare
7f14be1
to
d52981a
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, nice rework! It looks more correct and makes the different options much clearer, I find it much better than the previous versions of the PR.
Now for the small details :). A few observations below, mostly I think the paragraph starts a bit abruptly for users who come here just looking for a way to debug their issue, I think we should put the commands first and the explanations after that. See suggestions below.
Ah, one other thing, we are trying to move away from running commands inside of Cilium pods, but to use the |
d52981a
to
3f93eb4
Compare
Oh! I did not know that. I have never tried to used the cilium CLI. Because of that, could we follow this PR focusing on the idea that we are doing (without CLI)? I believe it will took me a little bit more to understand about it. If you have other suggestion (corrections), please, let me know! And, thank you again :) |
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 let's keep the cilium-cli for another PR.
I find the current version really neat, thanks a lot for this work!
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.
Nitpick: maybe we can unify style of diagrams in the docs? E.g. https://docs.cilium.io/en/v1.10/gettingstarted/cni-chaining-aws-cni/
3f93eb4
to
c2e5c3b
Compare
11c0da4
to
436475e
Compare
Adds `--debug-verbose=datapath` option for debugging eBPF datapath. Signed-off-by: Thiago Navarro <navarro@accuknox.com>
436475e
to
27cf327
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.
As someone who doesn't know much about this, I find this additional information very helpful! Thanks very much!
Adds
--debug-verbose=datapath
option for debugging.Signed-off-by: Thiago Navarro navarro@accuknox.com