mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
daemon: remove workaround for c8d client connection timeout
This workaround was added indf519e9e1a, pending a fix in containerd; > daemon: Fix giving up too early while connecting to containerd socket > > Explicitly set the gRPC connection params to take the timeout into > account to workaround the containerd v2 client not passing down the > stack. > > containerd v2 replaced usages of deprecated gRPC functions but didn't > pass the timeout to the actual dial connection options. A fix for this was merged in [containerd@ee574e7], which is part of containerd v2.1.0-beta.0, and backported to containerd v2.0.4 through [containerd@6b5efba]. [containerd@ee574e7]:ee574e76e7[containerd@6b5efba]:6b5efba83bSigned-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -280,19 +280,14 @@ func (r *remote) monitorDaemon(ctx context.Context) {
|
||||
continue
|
||||
}
|
||||
|
||||
const connTimeout = 60 * time.Second
|
||||
client, err = containerd.New(
|
||||
r.GRPC.Address,
|
||||
containerd.WithTimeout(connTimeout),
|
||||
containerd.WithTimeout(60*time.Second),
|
||||
containerd.WithDialOpts([]grpc.DialOption{
|
||||
grpc.WithTransportCredentials(insecure.NewCredentials()),
|
||||
grpc.WithContextDialer(dialer.ContextDialer),
|
||||
grpc.WithUnaryInterceptor(grpcerrors.UnaryClientInterceptor),
|
||||
grpc.WithStreamInterceptor(grpcerrors.StreamClientInterceptor),
|
||||
grpc.WithConnectParams(grpc.ConnectParams{
|
||||
// TODO: Remove after https://github.com/containerd/containerd/pull/11508
|
||||
MinConnectTimeout: connTimeout,
|
||||
}),
|
||||
}),
|
||||
)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user