Skip to content

Commit

Permalink
Merge #108994
Browse files Browse the repository at this point in the history
108994: roachprod: do not send monitor error when context is canceled r=herkolategan a=renatolabs

It adds noise to the logs and can be confusing; see comments added in the code.

Epic: none

Release note: None

Co-authored-by: Renato Costa <[email protected]>
  • Loading branch information
craig[bot] and renatolabs committed Aug 18, 2023
2 parents 104ed81 + d2b865a commit 60fa6c0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkg/roachprod/install/cluster_synced.go
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,16 @@ done
// pipe. Otherwise it can be closed under us, causing the reader to loop
// infinitely receiving a non-`io.EOF` error.
if err := sess.Wait(); err != nil {
// If we got an error waiting for the session but the context
// is already canceled, do not send an error through the
// channel; context cancelation happens at the user's request
// or when the test finishes. In either case, the monitor
// should quiesce. Reporting the error is confusing and can be
// spammy in the case of multiple monitors.
if monitorCtx.Err() != nil {
return
}

err := errors.Wrap(err, "failed to wait for session")
sendEvent(NodeMonitorInfo{Node: node, Event: MonitorError{err}})
return
Expand Down

0 comments on commit 60fa6c0

Please sign in to comment.