diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index 0b646a88a0..0ed519ee6e 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -12,6 +12,7 @@ #### Broadcaster - \#1875 Update 'trying to transcode' log statement with manifestID (@kyriediculous) +- \#1837 Only log discovery errors when request is not cancelled (@yondonfu) #### Orchestrator diff --git a/discovery/discovery.go b/discovery/discovery.go index 665f5f6ae5..f0303a622b 100644 --- a/discovery/discovery.go +++ b/discovery/discovery.go @@ -86,7 +86,7 @@ func (o *orchestratorPool) GetOrchestrators(numOrchestrators int, suspender comm infoCh <- info return } - if err != nil && !errors.Is(err, context.Canceled) && !errors.Is(err, context.DeadlineExceeded) { + if err != nil && !errors.Is(err, context.Canceled) { glog.Error(err) if monitor.Enabled { monitor.LogDiscoveryError(err.Error()) diff --git a/server/rpc.go b/server/rpc.go index 96ca3e5cf2..8b0a66a7c3 100644 --- a/server/rpc.go +++ b/server/rpc.go @@ -224,7 +224,7 @@ func GetOrchestratorInfo(ctx context.Context, bcast common.Broadcaster, orchestr req, err := genOrchestratorReq(bcast) r, err := c.GetOrchestrator(ctx, req) if err != nil { - return nil, fmt.Errorf("Could not get orchestrator orch=%v err=%v", orchestratorServer, err) + return nil, errors.Wrapf(err, "Could not get orchestrator orch=%v", orchestratorServer) } return r, nil @@ -237,8 +237,8 @@ func startOrchestratorClient(uri *url.URL) (net.OrchestratorClient, *grpc.Client grpc.WithBlock(), grpc.WithTimeout(GRPCConnectTimeout)) if err != nil { - glog.Errorf("Did not connect to orch=%v err=%v", uri, err) - return nil, nil, fmt.Errorf("Did not connect to orch=%v err=%v", uri, err) + return nil, nil, errors.Wrapf(err, "Did not connect to orch=%v", uri) + } c := net.NewOrchestratorClient(conn)