[WIP] Add basic restore implementation#3429
Draft
nayuta723 wants to merge 4 commits intoyouki-dev:mainfrom
Draft
[WIP] Add basic restore implementation#3429nayuta723 wants to merge 4 commits intoyouki-dev:mainfrom
nayuta723 wants to merge 4 commits intoyouki-dev:mainfrom
Conversation
4d1147a to
81e74fd
Compare
13 tasks
Update rust-criu rev to f405cdc1401f642a0640d3704be54618872b7811 and refactor restore/criu code to match its changed API: - Replace Notify trait impl with NotifyCallback fn pointer; use thread_local! RESTORE_CTX to share container state and console socket across the fn pointer boundary - Remove RestoreOpts and restore_notify(); call criu.restore() directly - Replace set_inherit_fd(key, fd) with add_inherit_fd(fd, &key) and remove manual fd offset calculation - Clear FD_CLOEXEC on namespace fds so CRIU inherits them via fork/exec, since the new rust-criu passes the original fd number in the protobuf and relies on fd inheritance rather than SCM_RIGHTS for inherit_fd Signed-off-by: nayuta723 <nayuta723@gmail.com>
…ased TODOs Replace the inline runc-based TODO comment block with a doc string on Container::checkpoint() that documents what is currently implemented and lists unimplemented features as TODO items based on crun's libcrun_container_checkpoint_linux_criu implementation. Signed-off-by: nayuta723 <nayuta723@gmail.com>
… fd) Update rust-criu from f405cdc to fd2fe0a (add-orphan-pts-console-socket-callback branch). The new version changes the NotifyCallback signature: - fds: &[RawFd] -> fd: Option<RawFd> - set_external() renamed to add_external() - add_inherit_fd() now returns Result Update call sites accordingly. Signed-off-by: nayuta723 <nayuta723@gmail.com>
The lifecycle checkpoint test was passing "checkpointt" (double 't') as the subcommand when running against the youki runtime, which would cause checkpoint tests to fail. Remove the runtime-specific match expression and use the correct "checkpoint" subcommand uniformly. Also reformat a long import in container_checkpoint.rs for clarity. Signed-off-by: nayuta723 <nayuta723@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Type of Change
Testing
Related Issues
closed #2335
Additional Context
ToDo
checkpoint/restorerust-criu