Skip to content

Conversation

@huikang
Copy link

@huikang huikang commented Nov 22, 2015

  • The aufs layer is commited during checkpoint
  • criu image path and image ID is persisted to the container config file

Signed-off-by: Hui Kang hkang.sunysb@gmail.com

Saied Kazemi and others added 4 commits November 12, 2015 12:00
Methods for checkpointing and restoring containers were added to the
native driver.  The LXC driver returns an error message that these
methods are not implemented yet.

Signed-off-by: Saied Kazemi <saied@google.com>

Conflicts:
	daemon/execdriver/native/create.go
	daemon/execdriver/native/driver.go
	daemon/execdriver/native/init.go

Conflicts:
	daemon/execdriver/driver.go
	daemon/execdriver/native/create.go
Support was added to the daemon to use the Checkpoint and Restore methods
of the native exec driver for checkpointing and restoring containers.

Signed-off-by: Saied Kazemi <saied@google.com>

Conflicts:
	api/server/server.go
	daemon/container.go
	daemon/daemon.go
	daemon/networkdriver/bridge/driver.go
	daemon/state.go
	vendor/src/github.com/docker/libnetwork/ipallocator/allocator.go

Conflicts:
	api/server/server.go
- C/R is now an EXPERIMENTAL level feature.
- Requires CRIU 1.6 (and builds it from source in the Dockerfile)
- Introduces checkpoint and restore as top level cli methods (will likely change)

Signed-off-by: Ross Boucher <rboucher@gmail.com>
- The aufs layer is commited during checkpoint
- criu image path and image ID is persisted to the container config file

Signed-off-by: Hui Kang <hkang.sunysb@gmail.com>
@huikang
Copy link
Author

huikang commented Nov 22, 2015

To test this PR

  1. Create a container
./docker-1.10.0-dev run -d busybox:latest /bin/sh -c 'i=0; while true; do echo $i >> /foo; i=$(expr $i + 1); sleep 1; done'
  1. Create a directory or file for the container, e.g., /root/test
  2. Checkpoint the container with --leave-running=true
./docker-1.10.0-dev checkpoint --leave-running=true <container ID>
  1. Delete the directory or the file, /root/test
  2. Stop the container
  3. Restore the container with --force=true and you will see the file /root/test because the restored container uses the image layer during checkpoint
    (run this comment twice to restore the container due to some network bridge bug in checkpoint)
./docker-1.10.0-dev restore --force=true

@huikang
Copy link
Author

huikang commented Nov 22, 2015

@boucher @avagin, could you take a minute to review this PR? Thanks.

@boucher boucher force-pushed the cr-combined branch 4 times, most recently from 7c96921 to 7fda470 Compare December 5, 2015 01:35
@boucher boucher force-pushed the cr-combined branch 8 times, most recently from d80f2fb to 9272300 Compare December 17, 2015 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants