Skip to content

Commit f975faa

Browse files
Merge pull request #4199 from adrianreber/checkpoint-restore-support
Provide support for checkpoint and restore
2 parents 29413d8 + f253c4b commit f975faa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+2824
-51
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
/bin/
1212
/test/bin2img/bin2img
1313
/test/checkseccomp/checkseccomp
14+
/test/checkcriu/checkcriu
1415
/test/copyimg/copyimg
1516
/build
1617
coverprofile

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,9 @@ test/copyimg/copyimg: $(GO_FILES) .gopathok
182182
test/checkseccomp/checkseccomp: $(GO_FILES) .gopathok
183183
$(GO_BUILD) $(GCFLAGS) $(GO_LDFLAGS) -tags "$(BUILDTAGS)" -o $@ $(PROJECT)/test/checkseccomp
184184

185+
test/checkcriu/checkcriu: $(GO_FILES) .gopathok
186+
$(GO_BUILD) $(GCFLAGS) $(GO_LDFLAGS) -tags "$(BUILDTAGS)" -o $@ $(PROJECT)/test/checkcriu
187+
185188
bin/crio: $(GO_FILES) .gopathok
186189
$(GO_BUILD) $(GCFLAGS) $(GO_LDFLAGS) -tags "$(BUILDTAGS)" -o $@ $(PROJECT)/cmd/crio
187190

@@ -225,6 +228,7 @@ endif
225228
$(MAKE) -C pinns clean
226229
rm -f test/copyimg/copyimg
227230
rm -f test/checkseccomp/checkseccomp
231+
rm -f test/checkcriu/checkcriu
228232
rm -rf ${BUILD_BIN_PATH}
229233

230234
# the approach here, rather than this target depending on the build targets
@@ -382,7 +386,7 @@ localintegration: clean binaries test-binaries
382386
./test/test_runner.sh ${TESTFLAGS}
383387

384388
binaries: bin/crio bin/crio-status bin/pinns
385-
test-binaries: test/copyimg/copyimg test/checkseccomp/checkseccomp
389+
test-binaries: test/copyimg/copyimg test/checkseccomp/checkseccomp test/checkcriu/checkcriu
386390

387391
MANPAGES_MD := $(wildcard docs/*.md)
388392
MANPAGES := $(MANPAGES_MD:%.md=%)

completions/bash/crio

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ h
4444
--default-ulimits
4545
--device-ownership-from-security-context
4646
--drop-infra-ctr
47+
--enable-criu-support
4748
--enable-metrics
4849
--enable-profile-unix-socket
4950
--enable-tracing

completions/fish/crio.fish

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ complete -c crio -n '__fish_crio_no_subcommand' -f -l default-transport -r -d 'A
4949
complete -c crio -n '__fish_crio_no_subcommand' -f -l default-ulimits -r -d 'Ulimits to apply to containers by default (name=soft:hard) (default: [])'
5050
complete -c crio -n '__fish_crio_no_subcommand' -f -l device-ownership-from-security-context -d 'Set devices\' uid/gid ownership from runAsUser/runAsGroup'
5151
complete -c crio -n '__fish_crio_no_subcommand' -f -l drop-infra-ctr -d 'Determines whether pods are created without an infra container, when the pod is not using a pod level PID namespace (default: true)'
52+
complete -c crio -n '__fish_crio_no_subcommand' -f -l enable-criu-support -d 'Enable CRIU integration, requires that the criu binary is available in $PATH. (default: \'\')'
5253
complete -c crio -n '__fish_crio_no_subcommand' -f -l enable-metrics -d 'Enable metrics endpoint for the server on localhost:9090'
5354
complete -c crio -n '__fish_crio_no_subcommand' -f -l enable-profile-unix-socket -d 'Enable pprof profiler on crio unix domain socket'
5455
complete -c crio -n '__fish_crio_no_subcommand' -f -l enable-tracing -d 'Enable OpenTelemetry trace data exporting'

completions/zsh/_crio

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ it later with **--config**. Global options will modify the output.'
5151
'--default-ulimits'
5252
'--device-ownership-from-security-context'
5353
'--drop-infra-ctr'
54+
'--enable-criu-support'
5455
'--enable-metrics'
5556
'--enable-profile-unix-socket'
5657
'--enable-tracing'

contrib/test/integration/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
- name: clone build and install cri-tools
2121
include: "build/cri-tools.yml"
2222
vars:
23-
cri_tools_git_version: "v1.24.2"
23+
cri_tools_git_version: "v1.25.0"
2424

2525
- name: clone build and install kubernetes
2626
include: "build/kubernetes.yml"

dependencies.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ dependencies:
4242
match: conmon
4343

4444
- name: cri-tools
45-
version: v1.24.2
45+
version: v1.25.0
4646
refPaths:
4747
- path: scripts/versions
4848
match: cri-tools

docs/crio.8.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ crio
4242
[--default-ulimits]=[value]
4343
[--device-ownership-from-security-context]
4444
[--drop-infra-ctr]
45+
[--enable-criu-support]
4546
[--enable-metrics]
4647
[--enable-profile-unix-socket]
4748
[--enable-tracing]
@@ -206,6 +207,8 @@ crio [GLOBAL OPTIONS] command [COMMAND OPTIONS] [ARGUMENTS...]
206207

207208
**--drop-infra-ctr**: Determines whether pods are created without an infra container, when the pod is not using a pod level PID namespace (default: true)
208209

210+
**--enable-criu-support**: Enable CRIU integration, requires that the criu binary is available in $PATH. (default: '')
211+
209212
**--enable-metrics**: Enable metrics endpoint for the server on localhost:9090
210213

211214
**--enable-profile-unix-socket**: Enable pprof profiler on crio unix domain socket

docs/crio.conf.5.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,9 @@ the container runtime configuration.
283283
**device_ownership_from_security_context**=false
284284
Changes the default behavior of setting container devices uid/gid from CRI's SecurityContext (RunAsUser/RunAsGroup) instead of taking host's uid/gid.
285285

286+
**enable_criu_support**=false
287+
Enable CRIU integration, requires that the criu binary is available in $PATH. (default: false)
288+
286289
### CRIO.RUNTIME.RUNTIMES TABLE
287290
The "crio.runtime.runtimes" table defines a list of OCI compatible runtimes. The runtime to use is picked based on the runtime handler provided by the CRI. If no runtime handler is provided, the runtime will be picked based on the level of trust of the workload.
288291

go.mod

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ require (
66
github.com/BurntSushi/toml v1.2.0
77
github.com/Microsoft/go-winio v0.5.2
88
github.com/blang/semver/v4 v4.0.0
9+
github.com/checkpoint-restore/checkpointctl v0.0.0-20220321135231-33f4a66335f0
10+
github.com/checkpoint-restore/go-criu/v5 v5.3.0
911
github.com/container-orchestrated-devices/container-device-interface v0.5.0
1012
github.com/containerd/cgroups v1.0.4
1113
github.com/containerd/containerd v1.6.8
@@ -111,7 +113,6 @@ require (
111113
github.com/VividCortex/ewma v1.2.0 // indirect
112114
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d // indirect
113115
github.com/acomagu/bufpipe v1.0.3 // indirect
114-
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be // indirect
115116
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect
116117
github.com/aws/aws-sdk-go v1.44.55 // indirect
117118
github.com/aws/aws-sdk-go-v2 v1.16.5 // indirect
@@ -136,8 +137,6 @@ require (
136137
github.com/cenkalti/backoff/v4 v4.1.3 // indirect
137138
github.com/census-instrumentation/opencensus-proto v0.3.0 // indirect
138139
github.com/cespare/xxhash/v2 v2.1.2 // indirect
139-
github.com/checkpoint-restore/checkpointctl v0.0.0-20220321135231-33f4a66335f0 // indirect
140-
github.com/checkpoint-restore/go-criu/v5 v5.3.0 // indirect
141140
github.com/cheggaaa/pb/v3 v3.0.8 // indirect
142141
github.com/chrismellard/docker-credential-acr-env v0.0.0-20220119192733-fe33c00cee21 // indirect
143142
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e // indirect

0 commit comments

Comments
 (0)