Skip to content

Conversation

@huikang
Copy link

@huikang huikang commented Nov 1, 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 October 29, 2015 09:58
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 1, 2015

To test this PR

  1. Create a container
./docker-1.9.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.9.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.9.0-dev restore --force=true

@boucher boucher force-pushed the cr-combined branch 2 times, most recently from b584b5a to a6a4511 Compare November 12, 2015 17:00
@huikang
Copy link
Author

huikang commented Nov 22, 2015

rebased as #23

@huikang huikang closed this Nov 22, 2015
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