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 descriptors.json when creating checkpoint #1511

Merged
merged 1 commit into from
Jan 24, 2023

Conversation

adrianreber
Copy link
Contributor

runc as well as crun create a file called descriptors.json in the checkpoint directory. descriptors.json contains a list of how the FDs 0, 1, 2 are connected before checkpointing:

$ cat descriptors.json # created by runc in this case ["/dev/null","pipe:[230688]","pipe:[230689]"]

With this information the FDs can be reconnected correctly during restore.

With this commit is it possible to do:

$ youki run container
$ youki checkpointt container
$ runc restore container

Now the checkpoint is in a format that can be handled by other container runtimes.

runc as well as crun create a file called descriptors.json in the
checkpoint directory. descriptors.json contains a list of how the FDs
0, 1, 2 are connected before checkpointing:

$ cat descriptors.json # created by runc in this case
["/dev/null","pipe:[230688]","pipe:[230689]"]

With this information the FDs can be reconnected correctly during
restore.

With this commit is it possible to do:

$ youki run container
$ youki checkpointt container
$ runc restore container

Now the checkpoint is in a format that can be handled by other container
runtimes.

Signed-off-by: Adrian Reber <[email protected]>
@codecov-commenter
Copy link

Codecov Report

Merging #1511 (88d26db) into main (d02acbc) will decrease coverage by 0.08%.
The diff coverage is 0.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1511      +/-   ##
==========================================
- Coverage   68.79%   68.71%   -0.08%     
==========================================
  Files         120      120              
  Lines       13082    13094      +12     
==========================================
- Hits         9000     8998       -2     
- Misses       4082     4096      +14     

Copy link
Member

@utam0k utam0k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Useful!

@utam0k utam0k merged commit 5bf1ea2 into youki-dev:main Jan 24, 2023
@adrianreber adrianreber deleted the 2023-01-23-descriptors branch January 24, 2023 15:55
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.

3 participants