When running containerd inside LXC, due to systemd being unable to execute
`modprobe overlay` inside the container (module is already loaded in host kernel).
This patch adds a `-` prefix to the `ExecStartPre` command, so that failures
are ignored, and the service can start as usual.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
The man page namespace is global, so in order to avoid colliding with
other man pages named "config.toml" rename ours to be more descriptive.
This also helps with discoverability (now tab-completion of 'man
containerd<tab>' will return the config man page), as well as making it
much cleaner from the perspective of distributions that want to package
containerd.
Signed-off-by: Aleksa Sarai <asarai@suse.de>
It is also useful when testing local changes, I just run:
sudo systemd-run -p Delegate=yes -p KillMode=process bin/containerd
Signed-off-by: Alban Crequy <alban@kinvolk.io>
Adds initial manpages for ctr, containerd, and containerd config
commands, as well as the config.toml configuration file.
Adds targets to Makefile for generating and installing manpages.
Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
re: #1632
The comment about plugins in README.md didn't seem relevant any longer so I
removed it.
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
By default, the generated spec will place containers in cgroups by their
ids, we need to use the namespace as the cgroup root to avoid
containers with the same name being placed in the same cgroup.
```
11:perf_event:/to/redis
10:freezer:/to/redis
9:memory:/to/redis
8:devices:/to/redis
7:net_cls,net_prio:/to/redis
6:pids:/to/redis
5:hugetlb:/to/redis
4:cpuset:/to/redis
3:blkio:/to/redis
2:cpu,cpuacct:/to/redis
1:name=systemd:/to/redis
11:perf_event:/te/redis
10:freezer:/te/redis
9:memory:/te/redis
8:devices:/te/redis
7:net_cls,net_prio:/te/redis
6:pids:/te/redis
5:hugetlb:/te/redis
4:cpuset:/te/redis
3:blkio:/te/redis
2:cpu,cpuacct:/te/redis
1:name=systemd:/te/redis
```
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This is needed for users on kernel older than 3.18 so they can avoid EBUSY
errors when trying to unlink, rename or remove a mountpoint that is present in
a shim namespace.
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This fixes the example in the getting started guide. The full example
was already correct; tested compilation and proper runtime on latest
master.
Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
Fixes#1399
This versions the prometheus metrics API so we can manage backwards
incompatible changes in the future more easily.
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Here is list of improvement:
- Add 2 intermediate full samples of code that can be compiled and ran
- Link to Runc.md page for runc installation
- Fix typo at the "Task Wait and Start" section
- Fix missing commands to run sample code at the getting stated guide
- Explicitly State go 1.8.x or above and link back to golang install page
Signed-off-by: Roy Inganta Ginting <ringanta.ginting@gmail.com>
Instead of requiring callers to read the struct fields to check for an
error, provide the exit results via a function instead which is more
natural.
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
In all of the examples, its recommended to call `Wait()` before starting
a process/task.
Since `Wait()` is a blocking call, this means it must be called from a
goroutine like so:
```go
statusC := make(chan uint32)
go func() {
status, err := task.Wait(ctx)
if err != nil {
// handle async err
}
statusC <- status
}()
task.Start(ctx)
<-statusC
```
This means there is a race here where there is no guarentee when the
goroutine is going to be scheduled, and even a bit more since this
requires an RPC call to be made.
In addition, this code is very messy and a common pattern for any caller
using Wait+Start.
Instead, this changes `Wait()` to use an async model having `Wait()`
return a channel instead of the code itself.
This ensures that when `Wait()` returns that the client has a handle on
the event stream (already made the RPC request) before returning and
reduces any sort of race to how the stream is handled by grpc since we
can't guarentee that we have a goroutine running and blocked on
`Recv()`.
Making `Wait()` async also cleans up the code in the caller drastically:
```go
statusC, err := task.Wait(ctx)
if err != nil {
return err
}
task.Start(ctx)
status := <-statusC
if status.Err != nil {
return err
}
```
No more spinning up goroutines and more natural error
handling for the caller.
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This adds an explaination to some of the config file settings and what
the accomplish in containerd.
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>