Skip to content

Commit

Permalink
Handle the situation when one of the nodes returns an error
Browse files Browse the repository at this point in the history
Signed-off-by: Mikolaj Pawlikowski <[email protected]>
  • Loading branch information
seeker89 committed Mar 12, 2021
1 parent 13ae09d commit 634e04e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/goldpinger/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@ func CheckCluster(ctx context.Context) *models.ClusterHealthResults {
response.OK = false
} else {
for _, resp := range checkAll.Responses {
// on error, there might be no response from the node
if resp.Response == nil {
response.OK = false
break
}
// if we get a response, let's check we get the expected nodes
observedNodes := []string{}
for peer := range resp.Response.PodResults {
observedNodes = append(observedNodes, peer)
Expand Down

0 comments on commit 634e04e

Please sign in to comment.