Skip to content

[release/1.4 backport] Return GRPC not found error instead of plain one#4872

Merged
estesp merged 1 commit intocontainerd:release/1.4from
masters-of-cats:pr-process-not-found-err-14
Dec 23, 2020
Merged

[release/1.4 backport] Return GRPC not found error instead of plain one#4872
estesp merged 1 commit intocontainerd:release/1.4from
masters-of-cats:pr-process-not-found-err-14

Conversation

@danail-branekov
Copy link
Copy Markdown
Contributor

When the shim returns a plain error when a process does not exist,
the server is unable to recognise its GRPC status code and assumes
UnknownError. This is awkward for containerd client users as they are
unable to recognise the actual reason for the error.

When the shim returns a NotFound GRPC error, it is properly translated
by the server and clients receive a proper NotFound error instead of
Unknown

Co-authored-by: Danail Branekov [email protected]
Co-authored-by: Danail Branekov [email protected]

Signed-off-by: Danail Branekov [email protected]
Signed-off-by: Georgi Sabev [email protected]

@k8s-ci-robot
Copy link
Copy Markdown

Hi @danail-branekov. 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.

Details

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.

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Dec 21, 2020

Build succeeded.

Copy link
Copy Markdown
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

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

When the shim returns a plain error when a process does not exist,
the server is unable to recognise its GRPC status code and assumes
UnknownError. This is awkward for containerd client users as they are
unable to recognise the actual reason for the error.

When the shim returns a NotFound GRPC error, it is properly translated
by the server and clients receive a proper NotFound error instead of
Unknown

Co-authored-by: Danail Branekov <[email protected]>
Co-authored-by: Georgi Sabev <[email protected]>

Signed-off-by: Danail Branekov <[email protected]>
Signed-off-by: Georgi Sabev <[email protected]>
(cherry picked from commit 7451dd1)
@danail-branekov danail-branekov force-pushed the pr-process-not-found-err-14 branch from 847e7e9 to 8cff6b3 Compare December 22, 2020 07:55
@danail-branekov
Copy link
Copy Markdown
Contributor Author

Done, cherry-picked with the -x option. Thanks!

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Dec 22, 2020

Build succeeded.

@AkihiroSuda
Copy link
Copy Markdown
Member

Linking the master PR: #4860 (Merged on Dec 22)

Copy link
Copy Markdown
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

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

LGTM

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.

4 participants