-
Notifications
You must be signed in to change notification settings - Fork 704
checkpoint: support checkpoint create command #4484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
b6e106e
to
fee41f4
Compare
fee41f4
to
c64d77c
Compare
292ceb4
to
c4ed970
Compare
# nerdctl run -d --name test-container ghcr.io/stargz-containers/alpine:3.13-org sleep infinity
b2a7213fd10f898f5af65493692aa2d1c18b9abd26fc477cc2c302170398987d
# nerdctl checkpoint create --leave-running=true --checkpoint-dir /tmp/test-checkpoints test-container test-checkpoint
test-checkpoint
# ls /tmp/test-checkpoints/test-checkpoint/
cgroup.img files.img ipcns-var-11.img pages-1.img tmpfs-dev-49.tar.gz.img tmpfs-dev-55.tar.gz.img
core-1.img fs-1.img mm-1.img pstree.img tmpfs-dev-52.tar.gz.img utsns-12.img
descriptors.json ids-1.img mountpoints-13.img seccomp.img tmpfs-dev-53.tar.gz.img
fdinfo-2.img inventory.img pagemap-1.img timens-0.img tmpfs-dev-54.tar.gz.img |
05cc852
to
61e9bac
Compare
31ce9fc
to
3a824b4
Compare
ci on rootless failed due to |
4fd28fb
to
d611488
Compare
- Create checkpoints from running containers using containerd APIs - Support both leave-running and exit modes via --leave-running flag - Configurable checkpoint directory via --checkpoint-dir flag Signed-off-by: ChengyuZhu6 <hudson@cyzhu.com>
add unit tests for checkpoint create command. Signed-off-by: ChengyuZhu6 <hudson@cyzhu.com>
add checkpoint create command reference. Signed-off-by: ChengyuZhu6 <hudson@cyzhu.com>
d611488
to
d9d2375
Compare
install criu in ci to test checkpoint. Signed-off-by: ChengyuZhu6 <hudson@cyzhu.com>
d9d2375
to
968e261
Compare
Flags: | ||
- :whale: `--leave-running`: Leave the container running after checkpoint | ||
- :whale: `checkpoint-dir`: Use a custom checkpoint storage directory | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How to restore a container from a checkpoint?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be accomplished with the command nerdctl start --checkpoint|--checkpoint-dir
in the following work: #4477
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you put the start
implementation in this PR too? Otherwise it is hard to test this PR.
You can include ls
and rm
in this PR too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, you're right. I think I can put the start parts in this PR.
Fixes: #4483