1
0
mirror of https://github.com/rancher/rke.git synced 2025-06-30 01:02:22 +00:00

Merge pull request #458 from HighwayofLife/unhealthy_host

Show host in error message for service unhealthy
This commit is contained in:
Alena Prokharchyk 2018-03-30 15:21:46 -07:00 committed by GitHub
commit c20cfb858a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -90,7 +90,7 @@ func getHealthz(client *http.Client, serviceName, hostAddress, url string) error
}
if resp.StatusCode != http.StatusOK {
statusBody, _ := ioutil.ReadAll(resp.Body)
return fmt.Errorf("service [%s] is not healthy response code: [%d], response body: %s", serviceName, resp.StatusCode, statusBody)
return fmt.Errorf("Service [%s] is not healthy on host [%s]. Response code: [%d], response body: %s", serviceName, hostAddress, resp.StatusCode, statusBody)
}
return nil
}