mirror of
https://github.com/bloomberg/goldpinger.git
synced 2026-02-14 18:09:50 +00:00
Handle the situation when one of the nodes returns an error
Signed-off-by: Mikolaj Pawlikowski <mikolaj@pawlikowski.pl>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user