Skip to content
This repository was archived by the owner on May 6, 2020. It is now read-only.

Commit bdcb1fe

Browse files
author
James O. D. Hunt
committed
doc: Update logging and debug docs based on review
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>
1 parent 001ed84 commit bdcb1fe

File tree

3 files changed

+28
-18
lines changed

3 files changed

+28
-18
lines changed

README.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ $ cc-runtime cc-env
8181

8282
## Logging
8383

84-
The runtime provides `--log=` and `--log-format=` options. However, it can
85-
also be configured to log to the system log (syslog or `journald`) such that
84+
The runtime provides `--log=` and `--log-format=` options. However, you can
85+
also configure it to log to the system log (syslog or `journald`) such that
8686
all log data is sent to both the specified logfile and the system log. The
8787
latter is useful as it is independent of the lifecycle of each container.
8888

@@ -104,23 +104,26 @@ To view proxy log output:
104104
$ sudo journalctl -t cc-proxy
105105
```
106106

107-
Note that the proxy log entries also include output from the agent (`cc-agent`) and the
107+
Note:
108+
109+
The proxy log entries also include output from the agent (`cc-agent`) and the
108110
hypervisor (which includes the guest kernel boot-time messages).
109111

110112
## Debugging
111113

112-
The runtime, the shim (`cc-shim`), the proxy (`cc-proxy`) and the hypervisor all have separate `enable_debug=` debug
114+
The runtime, the shim (`cc-shim`), the proxy (`cc-proxy`),
115+
and the hypervisor all have separate `enable_debug=` debug
113116
options in the [configuration file](#Configuration). By default, all these
114-
debug options are disabled. Look at the comments in the installed
117+
debug options are disabled. See the comments in the installed
115118
configuration file for further details.
116119

117-
If you wish to enable debug for all components, assuming a standard configuration file path, run:
120+
If you want to enable debug for all components, assuming a standard configuration file path, run:
118121

119122
```bash
120123
$ sudo sed -i -e 's/^#\(enable_debug\).*=.*$/\1 = true/g' /usr/share/defaults/clear-containers/configuration.toml
121124
```
122125

123-
For further details, see the [agent debug document](docs/debug-agent.md) and the [kernel debug document](docs/debug-kernel.md).
126+
See the [agent debug document](docs/debug-agent.md) and the [kernel debug document](docs/debug-kernel.md) for further details.
124127

125128
## Limitations
126129

docs/debug-agent.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,25 @@ Clear Containers runtime launch a special virtual machine when a new pod is
44
created. This VM uses a VM-agent to spawn processes on behalf of the
55
pod/container(s) running inside the VM.
66

7-
From Clear Containers 3.0-beta release a new agent (`cc-agent`) is used,
8-
[Clear Containers Agent](https://github.com/clearcontainers/agent).
7+
The Clear Containers 3.0-beta release uses a new agent (`cc-agent`),
8+
https://github.com/clearcontainers/agent.
99

10-
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).
10+
The Clear Containers agent relies heavily on [`libcontainer`](https://github.com/opencontainers/runc/tree/master/libcontainer)
11+
used by [`runc`](https://github.com/opencontainers/runc/), which is the
12+
standard program when running containers on bare metal.
1113

1214
To provide a debug log of any agent activity on a guest, the Clear Containers
13-
agent sends logs through a QEMU serial console that are collected by [cc-proxy](https://github.com/clearcontainers/proxy)
14-
and shown in its logs. By default, the Clear Containers agent logs are not collected by
15-
`cc-proxy` but can be enabled by enabling the proxy debug option.
15+
agent sends log data through a QEMU serial console, which is collected by
16+
[cc-proxy](https://github.com/clearcontainers/proxy) and shown in the proxy's
17+
logs.
18+
19+
By default, the Clear Containers agent logs are not collected by `cc-proxy`
20+
but can be enabled by enabling the proxy debug option:
1621

1722
1. Enable proxy debug
1823

19-
Set the `enable_debug=` option in the `[proxy.cc]` section to `true` (assumes a standard configuration file path):
24+
Set the `enable_debug=` option in the `[proxy.cc]` section to `true`, which
25+
assumes a standard configuration file path:
2026

2127
```
2228
$ sudo awk '{if (/^\[proxy\.cc\]/) {got=1}; if (got == 1 && /^#enable_debug/) {print "enable_debug = true"; got=0; next; } else {print}}' /usr/share/defaults/clear-containers/configuration.toml
@@ -30,9 +36,9 @@ and shown in its logs. By default, the Clear Containers agent logs are not colle
3036

3137
1. Filter the agent debug logs from the `cc-proxy` logs
3238

33-
The `cc-proxy` logs show the sources of its collated information. To only see
34-
the agent debug logs, filter `cc-proxy` logs by the QEMU serial console (the
35-
agent logs were sent through it). The QEMU serial console is represented by
39+
The `cc-proxy` logs show the sources of its collated information. To only
40+
see the agent debug logs, filter `cc-proxy` logs by the QEMU serial console
41+
that sent the agent logs. The QEMU serial console is represented by
3642
`source=qemu`.
3743

3844
```

docs/debug-kernel.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ to enable kernel boot logs using the configuration file.
1212

1313
1. Enable kernel boot messages
1414

15-
Set the `enable_debug=` option in the `[proxy.cc]` section to `true` (assumes a standard configuration file path):
15+
Set the `enable_debug=` option in the `[proxy.cc]` section to `true`, which
16+
assumes a standard configuration file path:
1617

1718
```
1819
$ sudo awk '{if (/^\[proxy\.cc\]/) {got=1}; if (got == 1 && /^#enable_debug/) {print "enable_debug = true"; got=0; next; } else {print}}' /usr/share/defaults/clear-containers/configuration.toml

0 commit comments

Comments
 (0)