-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Add support for checkpoint image #13505
Add support for checkpoint image #13505
Conversation
@adrianreber PTAL |
Overall I like this approach a lot. This is also very helpful when looking at our upcoming CRI-O changes. With something like this we might get container restore in Kubernetes without Kubernetes knowing that it is a restore. At some point, not now, this can be enhanced to have @rst0git Do you also store the name of the container engine (in this case Podman) in the image metadata? Just to make sure we have something in the image to quickly see if it is an image that we can also restore in CRI-O. I have already restored Podman checkpoints in CRI-O using the existing checkpoint archive. My assumption is that it should also be possible with this image format. |
@adrianreber Not explicitly, but the annotation keys contain the name of the container engine (e.g., |
8335bc8
to
0a5637d
Compare
0a5637d
to
6a8c505
Compare
8899939
to
011c6df
Compare
33087f6
to
786dfad
Compare
05607b7
to
d9b57da
Compare
002bc0f
to
bb42fcc
Compare
@Luap99 Would it be possible to add a label to overwrite this requirement? |
@Luap99 is this GTG? PTAL |
The changes in this commit have been generated with the following commands: go get github.com/checkpoint-restore/checkpointctl make vendor Signed-off-by: Radostin Stoyanov <[email protected]>
This is an enhancement proposal for the checkpoint / restore feature of Podman that enables container migration across multiple systems with standard image distribution infrastructure. A new option `--create-image <image>` has been added to the `podman container checkpoint` command. This option tells Podman to create a container image. This is a standard image with a single layer, tar archive, that that contains all checkpoint files. This is similar to the current approach with checkpoint `--export`/`--import`. This image can be pushed to a container registry and pulled on a different system. It can also be exported locally with `podman image save` and inspected with `podman inspect`. Inspecting the image would display additional information about the host and the versions of Podman, criu, crun/runc, kernel, etc. `podman container restore` has also been extended to support image name or ID as input. Suggested-by: Adrian Reber <[email protected]> Signed-off-by: Radostin Stoyanov <[email protected]>
The patch introduces the following test cases: 1. An attempt to checkpoint a container that does not exist should fail. 2. Checkpoint of a running container with --create-image should create a checkpoint image. 3. A single checkpoint image can be used to restore multiple containers, each with a different name. 4. Restoring multiple containers from checkpoint images with a single restore command. Signed-off-by: Radostin Stoyanov <[email protected]>
bb42fcc
to
bbe1063
Compare
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.
LGTM, thanks!
@Luap99 PTAL
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rhatdan, rst0git The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm Sorry for the delay. |
This is an enhancement proposal for the checkpoint / restore feature of Podman that enables container migration across multiple systems with standard image distribution infrastructure.
A new option
--create-image <image>
has been added to thepodman container checkpoint
command. This option tells Podman to create a container image. This is a standard image with a single layer, tar archive, that that contains all checkpoint files. This is similar to the current approach for container migration using--export
/--import
.The checkpoint image can be pushed to a container registry and pulled on a different system. It can also be exported locally with
podman image save
and inspected withpodman inspect
. Inspecting the image would display additional information (stored as annotations) about the host and the versions of Podman, criu, crun/runc, kernel, etc.podman container restore
has also been extended to support checkpoint image provided as input.Simple example:
Example with multiple containers:
Example using container registry: