From 9a4fe5e56ba8c8f6f43b1ad796255ba74d3e8564 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sun, 27 Mar 2022 12:16:31 +0200 Subject: [PATCH] integration: don't error if connection already closed with dockerd worker Signed-off-by: CrazyMax --- util/testutil/integration/dockerd.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/util/testutil/integration/dockerd.go b/util/testutil/integration/dockerd.go index 0dfe174b6b59..eeccbe44d132 100644 --- a/util/testutil/integration/dockerd.go +++ b/util/testutil/integration/dockerd.go @@ -8,6 +8,7 @@ import ( "os/exec" "path/filepath" "strings" + "syscall" "testing" "time" @@ -143,7 +144,11 @@ func (c dockerd) New(ctx context.Context, cfg *BackendConfig) (b Backend, cl fun } conn, err := dockerAPI.DialHijack(ctx, "/grpc", "h2c", nil) if err != nil { - return errors.Wrapf(err, "dockerd grpc conn error: %s", formatLogs(cfg.Logs)) + if errors.Is(err, syscall.ECONNRESET) || errors.Is(err, net.ErrClosed) { + logrus.Warn("dockerd conn already closed: ", err) + return nil + } + return errors.Wrap(err, "dockerd grpc conn error") } proxyGroup.Go(func() error {