-
Notifications
You must be signed in to change notification settings - Fork 70
Improve doc for debug #846
Improve doc for debug #846
Conversation
|
Note that, strictly, this is blocked by clearcontainers/proxy#181. |
|
Hi @grahamwhaley, @iphutch - please could you review? |
|
kubernetes qa-passed 👍 |
grahamwhaley
left a comment
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.
Some nitpicks, but nothing that really needs to block this, so I'll also give my
lgtm
| latter is useful as it is independent of the lifecycle of each container. | ||
|
|
||
| To view runtime log output, | ||
| To view runtime log output: |
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.
silly nit - technically I think that is a colon :, not a semi-colon ; :-)
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.
Wow, that's embarrassing! Fixing... ;)
README.md
Outdated
|
|
||
| The runtime, the shim (`cc-shim`), and the hypervisor all have separate debug | ||
| options in the [configuration file](#Configuration). | ||
| The runtime, the shim (`cc-shim`), the hypervisor and the proxy all have separate `enable_debug=` debug |
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.
if we are going to call out cc-shim, do we want to call out cc-proxy as well?
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.
Yeah, I'll re-order the elements and mention the proxy binary name...
README.md
Outdated
| $ sudo journalctl -t cc-runtime | ||
| ``` | ||
|
|
||
| ### Enabling debug for various components |
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.
What do you think to changing this title to:
Enabling and viewing debug for other components
to cover the fact we now show enabling and viewing, and we cover the runtime separately in the above section ?
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.
I take your point but this section also enables debug for the runtime. I'll rework both sections to make this clearer...
a761e8c to
4a55e72
Compare
|
Hi @grahamwhaley - branch updated. |
|
kubernetes qa-passed 👍 |
grahamwhaley
left a comment
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.
One suggestion - not a blocker.
lgtm
|
|
||
| ```bash | ||
| $ sudo sed -i -e 's/^#\(enable_debug\).*=.*$/\1 = true/g' /usr/share/defaults/clear-containers/configuration.toml | ||
| ``` |
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.
Looking much better, thanks @jodh-intel
Sorry to be a mild pain, but one more suggestion - do you think we should also link from here to the more detailed/specific debug docs we now have as well?
https://github.com/clearcontainers/runtime/blob/master/docs/debug-agent.md
https://github.com/clearcontainers/runtime/blob/master/docs/debug-kernel.md
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.
Done. Note that those 2 docs had rotted a bit so I've had to update them. In fact, I'm wondering if we want to merge them (maybe into the README itself) since as you can see, they are now very similar.
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 @jodh-intel
lgtm
|
kubernetes qa-passed 👍 |
d51328e to
001ed84
Compare
|
kubernetes qa-passed 👍 |
1 similar comment
|
kubernetes qa-passed 👍 |
|
Hi @klynnrif, @rcaballeromx - please could you review? |
|
Hi @klynnrif, @rcaballeromx - could you squeeze in a review for this one today possibly? |
|
@jodh-intel @rcaballeromx I should have time to take a look today. |
klynnrif
left a comment
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.
Completed a scrub for grammar and style guide consistency. Thanks!
README.md
Outdated
| ## Debugging | ||
| ## Logging | ||
|
|
||
| The runtime provides `--log=` and `--log-format=` options. However, it can |
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.
Suggested rewrite to stay active: However, you can also configure it to log...
README.md
Outdated
|
|
||
| The runtime, the shim (`cc-shim`), and the hypervisor all have separate debug | ||
| options in the [configuration file](#Configuration). | ||
| Note that the proxy log entries also include output from the agent (`cc-agent`) and the |
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.
I am unsure how notes are dealt with here, but I would typically format any sentence(s) as a note if it begins with "Note that..." For example,
..note::
The proxy log entries also include output from the agent (cc-agent) and the hypervisor, which includes the guest kernel boot-time messages.
README.md
Outdated
|
|
||
| ## Debugging | ||
|
|
||
| The runtime, the shim (`cc-shim`), the proxy (`cc-proxy`) and the hypervisor all have separate `enable_debug=` debug |
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.
Including the final comma (based on the style guide): The runtime, the shim (cc-shim), the proxy (cc-proxy), and the hypervisor all have searate enable_debug= debug...
README.md
Outdated
|
|
||
| The runtime, the shim (`cc-shim`), the proxy (`cc-proxy`) and the hypervisor all have separate `enable_debug=` debug | ||
| options in the [configuration file](#Configuration). By default, all these | ||
| debug options are disabled. Look at the comments in the installed |
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.
See the comments in the...
README.md
Outdated
| debug options are disabled. Look at the comments in the installed | ||
| configuration file for further details. | ||
|
|
||
| If you wish to enable debug for all components, assuming a standard configuration file path, run: |
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.
If you want to enable debug...
| (standard program when running containers on bare metal). | ||
| The Clear Containers agent relies heavily on [`libcontainer`](https://github.com/opencontainers/runc/tree/master/libcontainer) used by [`runc`](https://github.com/opencontainers/runc/) (standard program when running containers on bare metal). | ||
|
|
||
| To provide a debug log of any agent activity on a guest, the Clear Containers |
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.
Lines 12-14 suggested rewrite (possible this changes the meaning): To provide a debug log of any agent activity on a guest, the Clear Containers agent sends a log through a QEMU serial console, which is collected by cc-proxy] (https://github.com/clearcontainers/proxy) and shown in the proxy's logs.
docs/debug-agent.md
Outdated
| 1. Filter the agent debug logs from the `cc-proxy` logs | ||
|
|
||
| The `cc-proxy` logs show the sources of its collated information. To only see | ||
| the agent debug logs, filter `cc-proxy` logs by the QEMU serial console (the |
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.
... the agent debug logs, filter cc-proxy logs by the QEMU serial console that sent the agent logs.
docs/debug-kernel.md
Outdated
| 1. Enable debug in `configuration.toml` | ||
| 1. Enable kernel boot messages | ||
|
|
||
| Set the `enable_debug=` option in the `[proxy.cc]` section to `true` (assumes a standard configuration file path): |
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.
Set the enable_debut= option in the [proxy.cc] section to true, which assumes a standard configuration file path:
docs/debug-agent.md
Outdated
|
|
||
| 1. Enable proxy debug | ||
|
|
||
| Set the `enable_debug=` option in the `[proxy.cc]` section to `true` (assumes a standard configuration file path): |
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.
Set the enable_debug= option in the [proxy.cc] section to true, which assumes a standard configuration file path:
docs/debug-agent.md
Outdated
|
|
||
| The Clear Containers Agent relies heavily on libcontainer used by runc | ||
| (standard program when running containers on bare metal). | ||
| The Clear Containers agent relies heavily on [`libcontainer`](https://github.com/opencontainers/runc/tree/master/libcontainer) used by [`runc`](https://github.com/opencontainers/runc/) (standard program when running containers on bare metal). |
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.
... used by [runc] (https://github.com/opencontainers/runc/), which is the standard program when running containers on bare metal.
|
Hi @klynnrif - thanks for reviewing. Branch updated. (Note that as some of your suggested changes weren't strictly part of the changes I'd made on this PR, I've created a new commit specifically to address all the review changes). |
|
Hi @klynnrif, @rcaballeromx - could one of you take a look at this please? I'd really like to get this landed this week if possible. |
|
@jodh-intel @rcaballeromx I can take a look at this today. Thanks! |
klynnrif
left a comment
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.
A couple minor changes suggested. Thanks!
README.md
Outdated
| Note: | ||
|
|
||
| The proxy log entries also include output from the agent (`cc-agent`) and the | ||
| hypervisor (which includes the guest kernel boot-time messages). |
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.
... hypervisor, which includes the guest kernel boot-time messages.
README.md
Outdated
|
|
||
| The runtime, the shim (`cc-shim`), the proxy (`cc-proxy`), | ||
| and the hypervisor all have separate `enable_debug=` debug | ||
| options in the [configuration file](#Configuration). By default, all these |
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.
Lines 116-117 suggested rewrite: All of these debug options are disables by default.
|
kubernetes qa-passed 👍 |
All commands should be introduced with a sentence that ends with a colon. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Renamed "Debugging" section to "Logging" and explained how to view log output for all system components. Also created a top-level "Debugging" section which explains how to enable full debug. Fixes clearcontainers#845. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
The agent and kernel debug documents had deviated from reality. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Apply further changes to the debug and logging documents based on review feedback. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
bdcb1fe to
56aa874
Compare
|
Hi @klynnrif - thanks for re-reviewing. Branch updated. |
|
kubernetes qa-passed 👍 |
|
Hi @klynnrif - could you re-review this today if possible? |
|
@jodh-intel Yes, I can. Thanks! |
rcaballeromx
left a comment
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.
Great job @jodh-intel @klynnrif
|
Hi @klynnrif - please can you check this today? We have sufficient approvals (thanks Rodrigo) but I want to give you one last chance to review (as we still have the red cross against your name). If I haven't heard anything by COB today, I'll assume you are happy for me to force-merge this. |
|
We have sufficient approvals, so merging as we really need this to land... |
…oints network: Marshal BridgedMacvlanEndpoint and MacvtapEndpoint
No description provided.