mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Add containerd.WithTimeout(60*time.Second) to match old calls
Signed-off-by: John Howard <jhoward@microsoft.com>
This commit is contained in:
parent
2e5222a346
commit
5accd82634
2 changed files with 3 additions and 3 deletions
|
@ -741,7 +741,7 @@ func NewDaemon(ctx context.Context, config *config.Config, pluginStore *plugin.S
|
|||
grpc.WithDefaultCallOptions(grpc.MaxCallSendMsgSize(defaults.DefaultMaxSendMsgSize)),
|
||||
}
|
||||
if config.ContainerdAddr != "" {
|
||||
d.containerdCli, err = containerd.New(config.ContainerdAddr, containerd.WithDefaultNamespace(ContainersNamespace), containerd.WithDialOpts(gopts))
|
||||
d.containerdCli, err = containerd.New(config.ContainerdAddr, containerd.WithDefaultNamespace(ContainersNamespace), containerd.WithDialOpts(gopts), containerd.WithTimeout(60*time.Second))
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "failed to dial %q", config.ContainerdAddr)
|
||||
}
|
||||
|
@ -753,7 +753,7 @@ func NewDaemon(ctx context.Context, config *config.Config, pluginStore *plugin.S
|
|||
// Windows is not currently using containerd, keep the
|
||||
// client as nil
|
||||
if config.ContainerdAddr != "" {
|
||||
pluginCli, err = containerd.New(config.ContainerdAddr, containerd.WithDefaultNamespace(pluginexec.PluginNamespace), containerd.WithDialOpts(gopts))
|
||||
pluginCli, err = containerd.New(config.ContainerdAddr, containerd.WithDefaultNamespace(pluginexec.PluginNamespace), containerd.WithDialOpts(gopts), containerd.WithTimeout(60*time.Second))
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "failed to dial %q", config.ContainerdAddr)
|
||||
}
|
||||
|
|
|
@ -268,7 +268,7 @@ func (r *remote) monitorDaemon(ctx context.Context) {
|
|||
continue
|
||||
}
|
||||
|
||||
client, err = containerd.New(r.GRPC.Address)
|
||||
client, err = containerd.New(r.GRPC.Address, containerd.WithTimeout(60*time.Second))
|
||||
if err != nil {
|
||||
r.logger.WithError(err).Error("failed connecting to containerd")
|
||||
delay = time.After(100 * time.Millisecond)
|
||||
|
|
Loading…
Reference in a new issue