You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/faq.md
+29-6Lines changed: 29 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ Please open an issue if you want to add a question here.
6
6
7
7
LinuxKit does not require being installed on a disk, it is often run from an ISO, PXE or other
8
8
such means, so it does not require an on disk upgrade method such as the ChromeOS code that
9
-
is often used. It would definitely be possible to use that type of upgrade method if the
9
+
is often used. It would definitely be possible to use that type of upgrade method if the
10
10
system is installed, and it would be useful to support this for that use case, and an
11
11
updater container to control this for people who want to use this.
12
12
@@ -37,18 +37,41 @@ If you're not seeing `containerd` logs in the console during boot, make sure tha
37
37
38
38
`init` and other processes like `containerd` will use the last defined console in the kernel `cmdline`. When using `qemu`, to see the console you need to list `ttyS0` as the last console to properly see the output.
39
39
40
-
## Enabling debug or trace log levels on containerd
40
+
## Enabling and controlling containerd logs
41
41
42
-
On startup, linuxkit looks for and parses a file `/etc/containerd/cli-opts`. If it exists, the content is used as arguments to containerd. Thus, to enable
42
+
On startup, linuxkit looks for and parses a file `/etc/containerd/runtime-config.toml`. If it exists, the content is used to configure containerd runtime.
43
+
44
+
Sample config is below:
45
+
46
+
```toml
47
+
cliopts="--log-level debug"
48
+
stderr="/var/log/containerd.out.log"
49
+
stdout="stdout"
50
+
```
51
+
52
+
The options are as follows:
53
+
54
+
*`cliopts`: options to pass to the containerd command-line as is.
55
+
*`stderr`: where to send stderr from containerd. If blank, it sends it to the default stderr, which is the console.
56
+
*`stdout`: where to send stdout from containerd. If blank, it sends it to the default stdout, which is the console. containerd normally does not have any stdout.
57
+
58
+
The `stderr` and `stdout` options can take exactly one of the following options:
59
+
60
+
*`stderr` - send to stderr
61
+
*`stdout` - send to stdout
62
+
* any absolute path (beginning with `/`) - send to that file. If the file exists, append to it; if not, create it and append to it.
63
+
64
+
Thus, to enable
43
65
a higher log level, for example `debug`, create a file whose contents are `--log-level debug` and place it on the image:
44
66
45
67
```yml
46
68
files:
47
-
- path: /etc/containerd/cli-opts
48
-
contents: "--log-level debug"
69
+
- path: /etc/containerd/runtime-config.toml
70
+
source: "/path/to/runtime-config.toml"
71
+
mode: "0644"
49
72
```
50
73
51
-
Note that the package that parses the contents splits on _all_ whitespace. It does not, as of this writing, support shell-like parsing, so the following will work:
74
+
Note that the package that parses the `cliopts` splits on _all_ whitespace. It does not, as of this writing, support shell-like parsing, so the following will work:
0 commit comments