Environment not passed to criu when starting container from checkpoint #30031

Open
tswift242 opened this Issue Jan 10, 2017 · 0 comments

Projects

None yet

2 participants

@tswift242
Contributor

Description

I'm not sure if this is a docker, containerd, or runc issue, but it seems that at least one of these layers is not passing the current environment to criu when a container is started from a checkpoint (probably also when creating a checkpoint). Criu has certain options that can be set through environment variables, and these env vars don't seem to be respected when I do C/R through docker. For example, the CRIU_FAULT env var is not being respected, which we need to maintain good restore performance when we do many restores on a single host. See this criu issue for more info: xemul/criu#268 (comment)

Steps to reproduce the issue:

  1. export CRIU_FAULT=130
  2. docker run --security-opt=seccomp:unconfined --name cr -d ubuntu /bin/bash -c 'i=0; while true; do echo $i; i=$(expr $i + 1); sleep 5; done'
  3. docker checkpoint create cr test_cp
  4. docker start --checkpoint test_cp cr

Describe the results you received:

Did not see "Force no-breakpoints restore" (https://github.com/xemul/criu/blob/a7faf367a6b2e215a86f2fffe785c63aa3902c96/criu/parasite-syscall.c#L1432) in criu restore log, indicating CRIU_FAULT=130 setting wasn't respected.

Describe the results you expected:

Should see "Force no-breakpoints restore" in criu restore log, indicating CRIU_FAULT=130 setting is respected.

Output of docker version:

Client:
 Version:      1.13.0-rc5
 API version:  1.25
 Go version:   go1.7.3
 Git commit:   43cc971
 Built:        Thu Jan  5 03:07:30 2017
 OS/Arch:      linux/amd64

Server:
 Version:      1.13.0-rc5
 API version:  1.25 (minimum version 1.12)
 Go version:   go1.7.3
 Git commit:   43cc971
 Built:        Thu Jan  5 03:07:30 2017
 OS/Arch:      linux/amd64
 Experimental: true

Output of docker info:

Containers: 46
 Running: 46
 Paused: 0
 Stopped: 0
Images: 27
Server Version: 1.13.0-rc5
Storage Driver: overlay
 Backing Filesystem: extfs
 Supports d_type: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host ipvlan macvlan null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 03e5862ec0d8d3b3f750e19fca3ee367e13c090e
runc version: 51371867a01c467f08af739783b8beafc154c4d7
init version: 949e6fa
Security Options:
 apparmor
 seccomp
  Profile: default
Kernel Version: 4.4.39-040439-generic
Operating System: Ubuntu 14.04.5 LTS
OSType: linux
Architecture: x86_64
CPUs: 16
Total Memory: 120.1 GiB
Name: ip-10-97-2-120
ID: NSKT:GWC5:CRQH:BBVT:CSWF:BNL6:6T7O:AMSA:TAM6:72OO:CHOK:INU4
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
 File Descriptors: 425
 Goroutines: 342
 System Time: 2017-01-10T18:34:33.989626544Z
 EventsListeners: 0
Registry: https://index.docker.io/v1/
Experimental: true
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

Additional environment details (AWS, VirtualBox, physical, etc.):

AWS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment