Skip to content

Commit

Permalink
server: wrap error from GetOrchInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
kyriediculous committed May 18, 2021
1 parent 3826a4b commit d150b5e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG_PENDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 or deadline isn't exceeded (@yondonfu)

#### Orchestrator

Expand Down
2 changes: 1 addition & 1 deletion discovery/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
6 changes: 3 additions & 3 deletions server/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)

Expand Down

0 comments on commit d150b5e

Please sign in to comment.