From 5f2b3728fc1d71d32912c57d948ba4b15c886f2a Mon Sep 17 00:00:00 2001 From: Fabricio Voznika Date: Tue, 29 Jun 2021 10:53:10 -0700 Subject: Redirect all calls from `errdefs.ToGRPC` to `utils.ErrToGRPC` This is to ensure that Go 1.13 error wrapping is correctly translated to gRPC errors before returning from the shim. Updates #6225 PiperOrigin-RevId: 382120441 --- pkg/shim/proc/init_state.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pkg/shim/proc/init_state.go') diff --git a/pkg/shim/proc/init_state.go b/pkg/shim/proc/init_state.go index d65020e76..5347ddefe 100644 --- a/pkg/shim/proc/init_state.go +++ b/pkg/shim/proc/init_state.go @@ -23,6 +23,7 @@ import ( "github.com/containerd/containerd/pkg/process" runc "github.com/containerd/go-runc" "golang.org/x/sys/unix" + "gvisor.dev/gvisor/pkg/shim/utils" ) type stateTransition int @@ -235,6 +236,6 @@ func handleStoppedKill(signal uint32) error { // already been killed. return nil default: - return errdefs.ToGRPCf(errdefs.ErrNotFound, "process not found") + return utils.ErrToGRPCf(errdefs.ErrNotFound, "process not found") } } -- cgit v1.2.3