From a0903e1fa3eca32065c7dbfda8d1e0879cbfbb8f Mon Sep 17 00:00:00 2001 From: Drew Erny Date: Mon, 3 Jun 2019 11:33:01 -0500 Subject: [PATCH] Increase max recv gRPC message size for nodes and secrets Increases the max recieved gRPC message size for Node and Secret list operations. This has already been done for the other swarm types, but was not done for these. Signed-off-by: Drew Erny --- daemon/cluster/nodes.go | 5 ++++- daemon/cluster/secrets.go | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/daemon/cluster/nodes.go b/daemon/cluster/nodes.go index 3c073b0bac..dffd7556f0 100644 --- a/daemon/cluster/nodes.go +++ b/daemon/cluster/nodes.go @@ -8,6 +8,7 @@ import ( "github.com/docker/docker/daemon/cluster/convert" "github.com/docker/docker/errdefs" swarmapi "github.com/docker/swarmkit/api" + "google.golang.org/grpc" ) // GetNodes returns a list of all nodes known to a cluster. @@ -30,7 +31,9 @@ func (c *Cluster) GetNodes(options apitypes.NodeListOptions) ([]types.Node, erro r, err := state.controlClient.ListNodes( ctx, - &swarmapi.ListNodesRequest{Filters: filters}) + &swarmapi.ListNodesRequest{Filters: filters}, + grpc.MaxCallRecvMsgSize(defaultRecvSizeForListResponse), + ) if err != nil { return nil, err } diff --git a/daemon/cluster/secrets.go b/daemon/cluster/secrets.go index c6fd842081..6f652eb54d 100644 --- a/daemon/cluster/secrets.go +++ b/daemon/cluster/secrets.go @@ -7,6 +7,7 @@ import ( types "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/daemon/cluster/convert" swarmapi "github.com/docker/swarmkit/api" + "google.golang.org/grpc" ) // GetSecret returns a secret from a managed swarm cluster @@ -44,7 +45,9 @@ func (c *Cluster) GetSecrets(options apitypes.SecretListOptions) ([]types.Secret defer cancel() r, err := state.controlClient.ListSecrets(ctx, - &swarmapi.ListSecretsRequest{Filters: filters}) + &swarmapi.ListSecretsRequest{Filters: filters}, + grpc.MaxCallRecvMsgSize(defaultRecvSizeForListResponse), + ) if err != nil { return nil, err }