Skip to content

Commit

Permalink
test/connectivity: Add a bit more logging around Hubble connections
Browse files Browse the repository at this point in the history
When connections to hubble fail, there currently isn't enough
information to debug the issue after-the-fact. So, add in a few more
debug lines to try and get to the bottom of the problem.

Also, bump the connection timeout from 10 to 30 seconds.

Signed-off-by: Casey Callendrello <[email protected]>
  • Loading branch information
squeed committed Nov 9, 2022
1 parent 5ccea19 commit b4cc27f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion connectivity/check/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,12 @@ func (a *Action) Run(f func(*Action)) {
if err := a.followFlows(ctx, ready); err != nil {
a.Fatalf("Receiving flows from Hubble Relay: %s", err)
}
a.Debug("Receiving flows from Hubble Relay gracefully closed down.")
}()

// Wait for at least one Hubble node to signal that it's ready so we don't
// generate any traffic before it can be captured.
timeout := time.NewTimer(10 * time.Second)
timeout := time.NewTimer(30 * time.Second)
defer timeout.Stop()

select {
Expand Down Expand Up @@ -717,11 +718,13 @@ func (a *Action) followFlows(ctx context.Context, ready chan bool) error {
if errors.Is(err, io.EOF) ||
errors.Is(err, context.Canceled) ||
errors.Is(err, context.DeadlineExceeded) {
a.Debugf("Hubble polling ended: %v", err)
return nil
}

// Return gracefully on 'canceled' gRPC error.
if status.Code(err) == codes.Canceled {
a.Debugf("Hubble polling ended: %v", err)
return nil
}

Expand Down

0 comments on commit b4cc27f

Please sign in to comment.