mirror of
https://github.com/rancher/rke.git
synced 2025-06-30 17:22:07 +00:00
Merge pull request #458 from HighwayofLife/unhealthy_host
Show host in error message for service unhealthy
This commit is contained in:
commit
c20cfb858a
@ -90,7 +90,7 @@ func getHealthz(client *http.Client, serviceName, hostAddress, url string) error
|
|||||||
}
|
}
|
||||||
if resp.StatusCode != http.StatusOK {
|
if resp.StatusCode != http.StatusOK {
|
||||||
statusBody, _ := ioutil.ReadAll(resp.Body)
|
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
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user