Skip to content
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 conversion for different container runtimes/engines #130

Open
mayank-02 opened this issue Apr 19, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@mayank-02
Copy link
Contributor

mayank-02 commented Apr 19, 2024

Currently we don't support compatibility between container runtimes such as runc and crun, or engines such as Podman and CRI-O. For example, if a container checkpoint is created with crun, it is not currently possible to restore it with runc, or a checkpoint created with Podman can not be restored with CRI-O. Since all these container runtimes and engines use CRIU, it is technically possible and this functionality would be very useful.

For example, the following two files contain the implementation for container checkpointing with crun and runc:

For instance, in the case of runc and crun, the difference comes from implementation-specific format of configuration file stored in the checkpoint. For example, the code in [1] is used to save a configuration file and information about file descriptors specific to runc, while the code in [2] implements the equivalent in crun but with different format. The easiest way to see the difference would be to create a container checkpoint [3] using both runc and crun [4] and see what files are included in the checkpoint.

An effort in a similar vein is the proposal to standardize the checkpoint image definition format.

I believe adding the functionality to convert from container archive format to the other through checkpointctl will be quite useful. A sample invocation could look like (from clause can be optional):

$checkpointctl migrate/convert --from {podman,cri-o,kubernetes} --to {podman,cri-o,kubernetes} /tmp/ubuntu_looper.tar.gz

I'm happy to contribute to this issue. Please let me know your thoughts here!

CC: @rst0git

@rst0git rst0git changed the title Enabling Container Migration in Heterogeneous Clusters Add support for checkpoint compatibility with different container runtimes & engines Apr 19, 2024
@rst0git rst0git added the enhancement New feature or request label Apr 19, 2024
@rst0git rst0git changed the title Add support for checkpoint compatibility with different container runtimes & engines Add support for checkpoint conversion for different container runtimes/engines Apr 19, 2024
@rst0git
Copy link
Member

rst0git commented Apr 19, 2024

checkpointctl migrate/convert --from {podman,cri-o,kubernetes} --to {podman,cri-o,kubernetes} /tmp/ubuntu_looper.tar.gz

We had a short discussion about the name of the command (#125 (comment)) and it seems like checkpointctl convert would be more appropriate for this feature.

I'm not sure if I understand the purpose of --from / --to kubernetes, i.e., CRI-O and containerd are used by Kubernetes. They implement the checkpointing functionality.

@adrianreber
Copy link
Member

There should be no difference between runc/crun (I hope). The crun support was added based on what runc does. If crun does something differently we should try to fix crun.

Overall I would hope that it is possible to restore a checkpoint archive with any container archive. The differences are mainly in metadata and the goal should be to use the same metadata everywhere and if not possible handle the differences in the engines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants