Bug 1383551

Summary: [RFE] router endpoint 200 response for health check rather than 503
Product: OpenShift Container Platform Reporter: Takayoshi Kimura <tkimura>
Component: NetworkingAssignee: Ben Bennett <bbennett>
Networking sub component: router QA Contact: zhaozhanqi <zzhao>
Status: CLOSED NOTABUG Docs Contact:
Severity: low    
Priority: low CC: aos-bugs
Version: 3.3.0   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-23 13:04:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Takayoshi Kimura 2016-10-11 01:52:43 UTC
Description of problem:

By default if we send a simple HTTP request to the router endpoint it returns "503 Service Unavailable" response.

It would be nice if it returns 200 response as most frontend load balancer sends simple HTTP request to the endpoints and expects 200 response.

Version-Release number of selected component (if applicable):

3.3

How reproducible:

Always

Steps to Reproduce:
1. curl $ROUTER_IP
2.
3.

Actual results:

503 Service Unavailable

Expected results:

200 OK

Additional info:

Comment 1 Takayoshi Kimura 2016-10-11 02:03:48 UTC
I think it would be nicer if we added a configuration flag to switch 503/200 responses for the endpoint health check request.

Comment 2 Ben Bennett 2017-06-23 13:04:32 UTC
I'm sorry, I don't understand the use-case here.  What are you trying to determine the health of?  I see two choices:

1) A route: in which case you don't want to return 200 if the route is down since if a real request comes in, would you want to return our error page?

2) The router: in which case you can access the router stats page (as the router health checks do in the pod definition)

If you can give a good justification for the behavior we can certainly reconsider the request.

Comment 3 Takayoshi Kimura 2017-06-26 00:37:12 UTC
The use case is that external load balancers need to know the router endpoint 80/443 port health. Workarounds would be exposing 1936 port or deploy an app for health check.