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

Adapt crun to work with Podman's checkpoint/restore expectations #321

Merged
merged 3 commits into from
Apr 9, 2020

Conversation

adrianreber
Copy link
Contributor

The still hidden "_checkpoint" and "_restore" commands were not yet tested with Podman.

With the changes in this PR I am able to use checkpoint/restore from Podman with crun.

The restored container is not yet running in the correct network namespace, but the container is restored and Podman sees it as running. It almost seems to work now in combination with Podman.

The one thing missing for Podman using crun for checkpoint/restore is crun telling CRIU to restore the container into the network namespace created by Podman/CNI.

This continues #71 to fully support checkpoint/restore in crun.

The initial checkpoint implementation did not delete the state of the
checkpointed container. Looking at what Podman expects from the runtime
this adapts crun to work as Podman expects it for checkpoint/restore.

Signed-off-by: Adrian Reber <areber@redhat.com>
To restore a container Podman calls conmon and conmon calls the runtime.

This adds all parameters which conmon passes down to the runtime to
crun, so that crun actually restores the container. This are the
parameters --bundle and --pid-file.

This also now expects that the to be restored container has been
completely deleted from the /run directory and therefore --bundle
becomes necessary to know where to find the container.

With this change to restore and the previous change to checkpoint,
Podman can now use crun to checkpoint and restore a container.

The restored container does not yet have the correct network namespace
as this is not yet handled.

Signed-off-by: Adrian Reber <areber@redhat.com>
This adapts the checkpoint/restore test to succeed with previous changes
to checkpoint/restore.

Signed-off-by: Adrian Reber <areber@redhat.com>
@giuseppe
Copy link
Member

giuseppe commented Apr 9, 2020

thanks, LGTM

@giuseppe giuseppe merged commit ee22c3f into containers:master Apr 9, 2020
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.

None yet

2 participants