don't return 503 on RED cluster health, since we managed to handle the request, use "/" to check the status of the node (as a load balancer ping for example)
This commit is contained in:
parent
6232ce1dd4
commit
b6227f24c1
|
@ -87,9 +87,11 @@ public class RestClusterHealthAction extends BaseRestHandler {
|
|||
public void onResponse(ClusterHealthResponse response) {
|
||||
try {
|
||||
RestStatus status = RestStatus.OK;
|
||||
if (response.status() == ClusterHealthStatus.RED) {
|
||||
status = RestStatus.SERVICE_UNAVAILABLE;
|
||||
}
|
||||
// not sure..., we handle the health API, so we are not unavailable
|
||||
// in any case, "/" should be used for
|
||||
//if (response.status() == ClusterHealthStatus.RED) {
|
||||
// status = RestStatus.SERVICE_UNAVAILABLE;
|
||||
//}
|
||||
XContentBuilder builder = RestXContentBuilder.restContentBuilder(request);
|
||||
builder.startObject();
|
||||
|
||||
|
|
Loading…
Reference in New Issue