Wire through CRI ContainerCheckpoint RPC

This connects the new CRI ContainerCheckpoint RPC to the existing
internal checkpoint functions. With this commit it is possible
to checkpoint a container in Kubernetes using the Forensic Container
Checkpointing KEP (#2008):

 # curl X POST "https://localhost:10250/checkpoint/namespace/podId/container"

Which will result in containerd creating a checkpoint in the location
specified by Kubernetes (usually /var/lib/kubelet/checkpoints).

This is a Linux only feature because CRIU only exists on Linux.

Rewritten with the help of Phil Estes.

Signed-off-by: Phil Estes <estesp@gmail.com>
Signed-off-by: Adrian Reber <areber@redhat.com>
This commit is contained in:
Adrian Reber
2022-05-20 06:38:33 +00:00
parent e53663cca7
commit f25770e48d
20 changed files with 4085 additions and 1 deletions

7
vendor/modules.txt vendored
View File

@@ -76,6 +76,13 @@ github.com/cenkalti/backoff/v4
# github.com/cespare/xxhash/v2 v2.2.0
## explicit; go 1.11
github.com/cespare/xxhash/v2
# github.com/checkpoint-restore/checkpointctl v1.1.0
## explicit; go 1.18
github.com/checkpoint-restore/checkpointctl/lib
# github.com/checkpoint-restore/go-criu/v7 v7.0.0
## explicit; go 1.18
github.com/checkpoint-restore/go-criu/v7
github.com/checkpoint-restore/go-criu/v7/rpc
# github.com/cilium/ebpf v0.11.0
## explicit; go 1.19
github.com/cilium/ebpf