-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 images with 'podman run' #16569
Add support for checkpoint images with 'podman run' #16569
Conversation
quick glance and the changs look reasonable, but the test are very red and angry.... |
e2b0ff2
to
d37eca3
Compare
d37eca3
to
3b160a8
Compare
The following CI failures look unrelated to the changes in this pull request.
@edsantiago would you be able to confirm this? |
|
Nope. My current hypothesis is that the trailing space in the title is getting backslash-escaped improperly in our environment passthrough. @rst0git that will take me some time to debug; ITM, to expedite this, could I ask you to re-push? I've fixed the title (removed trailing space) but it's still necessary to re-push for Cirrus to get the new title. You can |
3b160a8
to
74ef164
Compare
Thank you @edsantiago! |
@rhatdan @adrianreber PTAL |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rhatdan, 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 |
These tests were unintentionally removed in commit b47b48f (Revert "Add checkpoint image tests"). They verify the functionality of the `--create-image` option for `podman container checkpoint`. Signed-off-by: Radostin Stoyanov <[email protected]>
This patch extends the podman run command with support for checkpoint images. When `podman run` is invoked with an image that contains a checkpoint, it would restore the container from that checkpoint. Example: podman run -d --name looper busybox /bin/sh -c \ 'i=0; while true; do echo $i; i=$(expr $i + 1); sleep 1; done' podman container checkpoint --create-image checkpoint-image-1 looper podman run checkpoint-image-1 Signed-off-by: Radostin Stoyanov <[email protected]>
Signed-off-by: Radostin Stoyanov <[email protected]>
74ef164
to
a93a390
Compare
Looks good to me. |
My one concern with this, is it going to slow down the start of Podman. We are trying to speed up starting of containers, and if this has to inspect images on all containers before starting, this could slow it down. |
Good point. @rst0git If I understand the code correctly you are only looking at the annotations of the image and do not actually open the image to detect if it is a checkpoint image, right? Could you also run a couple of timing tests with and without the tests. How much slower is |
I used the following command to measure the performance of
|
@alexlarsson PTAL |
Can you share your numbers? |
Yes, I've uploaded the results in https://gist.github.com/rst0git/c3ee40feaa36eb9e5c64750aa92f3b0d |
The numbers look the same for both cases. So just looking at an annotation as your change does, does not seem to introduce a measurable delay. Not sure if there is some caching going in Podman when it comes to image annotations. Maybe somebody else can give an additional interpretation for your numbers. |
This is probably a very stupid comment, but: https://gist.github.com/rst0git/c3ee40feaa36eb9e5c64750aa92f3b0d#file-test-sh-L5 ...I would feel so much more comfortable with your results if the string PODMAN=$(pwd)/bin/podman
$PODMAN version |
@edsantiago Thank you for the advice! I've updated the evaluation script: |
/lgtm |
This pull request is a follow up on #15868, #16068 and #16078. It extends the
podman run
command with support for checkpoint images. Whenpodman run
is invoked with an image that contains checkpoint annotation, it would invoke restore.Example:
Does this PR introduce a user-facing change?