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

Fix runtime check during restore #14717

Merged
merged 2 commits into from
Jun 28, 2022

Conversation

ZeyadYasser
Copy link
Contributor

@ZeyadYasser ZeyadYasser commented Jun 23, 2022

cfg.RuntimePath was set to default runtime, so the empty string check fails. Instead we could check if the flag was changed.

It is a minor bug that was already mentioned in the issue below, so I didn't think I should create a new issue. Please let me know if this is a requirement.

Fixes: #11945

Signed-off-by: Zeyad Yasser [email protected]

Does this PR introduce a user-facing change?

None

@ZeyadYasser ZeyadYasser force-pushed the fix-restore-runtime-check branch 4 times, most recently from 6375949 to 8df3c60 Compare June 24, 2022 15:26
@ZeyadYasser
Copy link
Contributor Author

ZeyadYasser commented Jun 24, 2022

Runtime verification test for container checkpoint with export used the default runtime for test which causes test to always pass. Problem rises when using non-default runtime, then doing a restore.
I just forced using a non-default runtime during container creation to trigger the edge case I faced.

@mheon
Copy link
Member

mheon commented Jun 24, 2022

@edsantiago PTAL

@ZeyadYasser ZeyadYasser force-pushed the fix-restore-runtime-check branch from 8df3c60 to a82ae61 Compare June 24, 2022 16:34
@ZeyadYasser
Copy link
Contributor Author

https://api.cirrus-ci.com/v1/artifact/task/4817234857033728/ginkgo_node_logs/test/e2e/ginkgo-node-3.log

Looks like --runtime is implicitly set to the default runtime, I will look into a way to remove the --runtime arg.

@ZeyadYasser ZeyadYasser force-pushed the fix-restore-runtime-check branch 3 times, most recently from f3c14d1 to 9663b20 Compare June 25, 2022 17:07
@ZeyadYasser
Copy link
Contributor Author

https://api.cirrus-ci.com/v1/artifact/task/4817234857033728/ginkgo_node_logs/test/e2e/ginkgo-node-3.log

Looks like --runtime is implicitly set to the default runtime, I will look into a way to remove the --runtime arg.

UPDATE: I created a new test to address this problem.

Copy link
Member

@edsantiago edsantiago left a comment

Choose a reason for hiding this comment

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

Test LGTM overall, but needs some work. Thanks @ZeyadYasser

(and OBTW I suspect the team will ask you to squash your commits)

test/e2e/checkpoint_test.go Outdated Show resolved Hide resolved
test/e2e/checkpoint_test.go Outdated Show resolved Hide resolved
test/e2e/checkpoint_test.go Outdated Show resolved Hide resolved
test/e2e/checkpoint_test.go Outdated Show resolved Hide resolved
test/e2e/checkpoint_test.go Outdated Show resolved Hide resolved
test/e2e/checkpoint_test.go Outdated Show resolved Hide resolved
test/e2e/checkpoint_test.go Outdated Show resolved Hide resolved
test/e2e/checkpoint_test.go Outdated Show resolved Hide resolved
test/e2e/checkpoint_test.go Outdated Show resolved Hide resolved
test/e2e/checkpoint_test.go Outdated Show resolved Hide resolved
@ZeyadYasser ZeyadYasser force-pushed the fix-restore-runtime-check branch from 9663b20 to b305389 Compare June 28, 2022 13:21
@ZeyadYasser
Copy link
Contributor Author

Test LGTM overall, but needs some work. Thanks @ZeyadYasser

(and OBTW I suspect the team will ask you to squash your commits)

Thanks @edsantiago for the feedback, I updated the test accordingly.
Waiting for CI to finish.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 28, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: edsantiago, ZeyadYasser

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 Jun 28, 2022
@edsantiago
Copy link
Member

Test LGTM, thanks again. I still think you're going to get some encouragement to squash, or at the very very least reorder the commits because in this order (tests first, then code) there is a nonfunctional commit. But I'll step back and defer to the team.

@rhatdan
Copy link
Member

rhatdan commented Jun 28, 2022

LGTM but reverse your PRs.

cfg.RuntimePath was set to default runtime, so the empty string
check fails. Instead we could check if the flag was changed.

Signed-off-by: Zeyad Yasser <[email protected]>
Runtime verification test for container checkpoint with export
used the default runtime for test which causes test to always
pass. Problem rises when using non-default runtime, then doing
a restore. This test forcse using a non-default runtime during
container creation.

Edge case:
	1. Default runtime is crun
	2. Container is created with runc
	3. Checkpoint without setting --runtime into archive
	4. Restore without setting --runtime from archive

It should be expected that podman identifies runtime from the
checkpoint archive.

Signed-off-by: Zeyad Yasser <[email protected]>
@ZeyadYasser ZeyadYasser force-pushed the fix-restore-runtime-check branch from b305389 to 79a38a2 Compare June 28, 2022 14:15
@edsantiago
Copy link
Member

@mheon here we go again with the timeout. I've restarted anyway.

@mheon
Copy link
Member

mheon commented Jun 28, 2022

@vrothberg Looks like we're seeing timeouts in podman wait, specifically in remote Podman, after the Gitlab patches landed.

@mheon
Copy link
Member

mheon commented Jun 28, 2022

At least seem to be significantly rarer than the other issues. I don't see any obvious cause, unfortunately.

@edsantiago
Copy link
Member

@mheon @vrothberg I'll file a bug as soon as this PR merges (at which time my flake collector will save the logs).

CI is green, but I don't feel comfortable merging (tests LGTM but the code change needs someone more familiar with that code).

@rhatdan
Copy link
Member

rhatdan commented Jun 28, 2022

/lgtm
Thanks @ZeyadYasser

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 28, 2022
@openshift-ci openshift-ci bot merged commit 60c9aea into containers:main Jun 28, 2022
@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 21, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 21, 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. release-note-none
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Restoring exported runc container requires --runtime runc
4 participants