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

Return correct error if CRIU binary is missing #9960

Merged
merged 1 commit into from May 6, 2024

Conversation

adrianreber
Copy link
Contributor

@adrianreber adrianreber commented Mar 12, 2024

For the first version of containerd's "Forensic Container Checkpointing" support the error message if the CRIU binary is not found was deliberately wrong to not break Kubernetes e2e_node tests.

Now that the e2e_node tests have been adapted, containerd can return the correct error message.

Depends on kubernetes/kubernetes#123886

For the first version of containerd's "Forensic Container Checkpointing"
support the error message if the CRIU binary is not found was
deliberately wrong to not break Kubernetes e2e_node tests.

Now that the e2e_node tests have been adapted, containerd can return the
correct error message.

Signed-off-by: Adrian Reber <areber@redhat.com>
@k8s-ci-robot
Copy link

Hi @adrianreber. Thanks for your PR.

I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@akhilerm
Copy link
Member

/ok-to-test

@adrianreber
Copy link
Contributor Author

Changed to a draft PR as long the necessary Kubernetes PR is not merged.

@adrianreber adrianreber marked this pull request as ready for review May 5, 2024 12:35
@adrianreber
Copy link
Contributor Author

With the corresponding Kubernetes changes merged this can now also be reviewed. Switching from draft to ready for review.

log.G(ctx).WithError(err).Errorf("Failed to checkpoint container %q", r.GetContainerId())
return nil, status.Errorf(codes.Unimplemented, "method CheckpointContainer not implemented")
errorMessage := fmt.Sprintf(
"CRIU binary not found or too old (<%d). Failed to checkpoint container %q",
Copy link
Member

Choose a reason for hiding this comment

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

suggestion:

errMsg := fmt.Sprintf("failed to checkpoint container %q", r.GetContainerId())

since the detail message is covered by err.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately Kubernetes depends on the error message. Changing it now requires Kubernetes changes again.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@estesp estesp added this pull request to the merge queue May 6, 2024
Merged via the queue into containerd:main with commit 04c7d6c May 6, 2024
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants