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

Restore runtime verification #12351

Conversation

adrianreber
Copy link
Collaborator

There are at least two runtimes that support checkpoint and restore: runc and crun. Although the checkpoints created by these are almost compatible, it is not (yet) possible to restore a checkpoint created with one runtime with the other runtime. To make checkpoint/restore usage more comfortable this adds code to look into the checkpoint archive during restore and to set the runtime to the one used during checkpointing.

This also adds a check, if the user explicitly sets a runtime during restore, that the runtime is also the same as used during checkpointing.

If a different runtime is selected than the one used during checkpointing the restore will fail early.

If runc and crun will create compatible checkpoints in the future the check can be changed to treat crun and runc as compatible checkpoint/restore runtimes.

Fixes: #11945

@TomSweeneyRedHat
Copy link
Member

Changes LGTM, but one or more of the files need some gofmt help @adrianreber

@vrothberg
Copy link
Member

Probably need to rebase as well. CI has been sick today.

@adrianreber adrianreber force-pushed the 2021-11-18-restore-runtime-verification branch from e2ac6a0 to 9d517da Compare November 19, 2021 09:18
@adrianreber
Copy link
Collaborator Author

gofmt fixed and rebased

@adrianreber adrianreber force-pushed the 2021-11-18-restore-runtime-verification branch from 9d517da to c188b30 Compare November 19, 2021 10:58
@rhatdan
Copy link
Member

rhatdan commented Nov 19, 2021

Tests not happy.

@adrianreber
Copy link
Collaborator Author

Seems like I broke checkpointing. Looking into it.

@adrianreber adrianreber force-pushed the 2021-11-18-restore-runtime-verification branch from c188b30 to 492a584 Compare November 19, 2021 16:06
There are at least two runtimes that support checkpoint and restore:
runc and crun. Although the checkpoints created by these are almost
compatible, it is not (yet) possible to restore a checkpoint created
with one runtime with the other runtime. To make checkpoint/restore
usage more comfortable this adds code to look into the checkpoint
archive during restore and to set the runtime to the one used during
checkpointing.

This also adds a check, if the user explicitly sets a runtime during
restore, that the runtime is also the same as used during checkpointing.

If a different runtime is selected than the one used during
checkpointing the restore will fail early.

If runc and crun will create compatible checkpoints in the future the
check can be changed to treat crun and runc as compatible
checkpoint/restore runtimes.

Signed-off-by: Adrian Reber <[email protected]>
On container restore ensures that the same container runtime is used as
during checkpointing and it also ensures that the user does not select
a different runtime.

Signed-off-by: Adrian Reber <[email protected]>
@adrianreber adrianreber force-pushed the 2021-11-18-restore-runtime-verification branch from 492a584 to ced0ffb Compare November 19, 2021 17:46
Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

LGTM
@containers/podman-maintainers PTAL

Copy link
Contributor

@rst0git rst0git left a comment

Choose a reason for hiding this comment

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

LGTM

@mheon
Copy link
Member

mheon commented Nov 22, 2021

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 22, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 22, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adrianreber, flouthoc, mheon, 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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 22, 2021
@openshift-merge-robot openshift-merge-robot merged commit 26b45a1 into containers:main Nov 22, 2021
@adrianreber adrianreber deleted the 2021-11-18-restore-runtime-verification branch December 3, 2021 16:28
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Restoring exported runc container requires --runtime runc
8 participants