Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.

shimv2 should return grpc error codes#1528

Merged
lifupan merged 3 commits into
kata-containers:masterfrom
bergwolf:grpc
Apr 15, 2019
Merged

shimv2 should return grpc error codes#1528
lifupan merged 3 commits into
kata-containers:masterfrom
bergwolf:grpc

Conversation

@bergwolf
Copy link
Copy Markdown
Member

containerd relies on it to determine proper actions, e.g., fail the operation or wait for an exit event.[1]

ref: [1] https://github.com/containerd/cri/blob/master/pkg/server/container_stop.go#L141

So that shimv2 can convert it into grpc errors.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
containerd checks for the grpc error code to determine
correct recover action upon grpc errors. We need to provide
them properly.

Unfortunately ttrpc doesn't support grpc interceptor so we have
to modify every service function for it.

Fixes: kata-containers#1527

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
So that caller can determine that it is ENOENT-alike error.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
@bergwolf
Copy link
Copy Markdown
Member Author

/test

@devimc
Copy link
Copy Markdown

devimc commented Apr 12, 2019

cc @lifupan

@lifupan lifupan merged commit 2b45f0b into kata-containers:master Apr 15, 2019
@egernst egernst mentioned this pull request Apr 16, 2019
This was referenced May 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants