containerd/cmd/ctr/commands
Wei Fu 5f9b318e50 bin/ctr,integration: new runc-shim with failpoint
Added new runc shim binary in integration testing.

The shim is named by io.containerd.runc-fp.v1, which allows us to use
additional OCI annotation `io.containerd.runtime.v2.shim.failpoint.*` to
setup shim task API's failpoint. Since the shim can be shared with
multiple container, like what kubernetes pod does, the failpoint will be
initialized during setup the shim server. So, the following the
container's OCI failpoint's annotation will not work.

This commit also updates the ctr tool that we can use `--annotation` to
specify annotations when run container. For example:

```bash
➜  ctr run -d --runtime runc-fp.v1 \
     --annotation "io.containerd.runtime.v2.shim.failpoint.Kill=1*error(sorry)" \
     docker.io/library/alpine:latest testing sleep 1d

➜  ctr t ls
TASK       PID       STATUS
testing    147304    RUNNING

➜  ctr t kill -s SIGKILL testing
ctr: sorry: unknown

➜  ctr t kill -s SIGKILL testing

➜  sudo ctr t ls
TASK       PID       STATUS
testing    147304    STOPPED
```

The runc-fp.v1 shim is based on core runc.v2. We can use it to inject
failpoint during testing complicated or big transcation API, like
kubernetes PodRunPodsandbox.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-07-22 23:25:40 +08:00
..
containers ctr: Fix ctr c create fails to parse arguments 2022-06-23 21:52:53 +09:00
content fix can't edit object by using ctr content edit command 2022-07-04 11:44:44 +08:00
events ctr events: do not exit on an error 2020-01-29 13:10:16 +09:00
images code cleanup 2022-07-19 22:46:32 +08:00
install Add optional install path 2018-09-11 10:36:00 -04:00
leases ctr: Unify the delete subcommand alias 2022-01-11 16:21:26 +08:00
namespaces feat: replace github.com/pkg/errors to errors 2022-01-07 10:27:03 +08:00
oci feat: replace github.com/pkg/errors to errors 2022-01-07 10:27:03 +08:00
plugins Remove all gogoproto extensions 2022-04-20 07:23:28 +00:00
pprof Fix missing closed HTTP Body 2022-06-28 14:49:27 +08:00
run bin/ctr,integration: new runc-shim with failpoint 2022-07-22 23:25:40 +08:00
sandboxes ctr sandbox: handle sandbox config 2022-05-19 15:28:49 +03:00
shim Move runtime v2 proto 2022-04-19 17:59:33 -07:00
snapshots ctr: Unify the delete subcommand alias 2022-01-11 16:21:26 +08:00
tasks Use typeurl.Any instead of github.com/gogo/protobuf/types.Any 2022-03-24 20:50:07 +00:00
version adding go version to client description 2019-10-06 13:38:51 +02:00
client.go implement ctr -connect-timeout 2019-09-16 13:56:53 +02:00
cni.go fix: ctr run --cni get failed 2022-03-15 15:46:29 +08:00
commands_unix.go Implement --device idType://id for ctr run on Windows 2022-03-12 08:16:43 +11:00
commands_windows.go Add ctr support for CPUMax and CPUShares 2022-04-28 13:17:16 -07:00
commands.go bin/ctr,integration: new runc-shim with failpoint 2022-07-22 23:25:40 +08:00
resolver.go feat: replace github.com/pkg/errors to errors 2022-01-07 10:27:03 +08:00
signals_linux.go Ignore SIGURG signals in signal forwarder 2020-09-04 16:19:31 -07:00
signals_notlinux.go Run go fmt with Go 1.17 2021-08-22 09:31:50 +09:00
signals.go Ignore SIGURG signals in signal forwarder 2020-09-04 16:19:31 -07:00
utils.go Implemented image encryption/decryption libraries and ctr commands 2019-07-17 15:19:58 -04:00