Bug 1579036

Summary: Application logs record HTTP 302 response, route returns HTTP 504
Product: OpenShift Online Reporter: Stefanie Forrester <dakini>
Component: RoutingAssignee: Ben Bennett <bbennett>
Status: CLOSED NOTABUG QA Contact: zhaozhanqi <zzhao>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: aos-bugs
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: 2018-05-16 21:16:46 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:
Embargoed:

Description Stefanie Forrester 2018-05-16 20:43:09 UTC
Description of problem:

There is at least one application in Pro tier which is recording an HTTP 302 response in the application logs, but returning an HTTP 504 response to the user. This is leading the customer to believe that their app is experiencing outages on a regular basis.

A customer is reporting downtime via a monitoring tool. I can reproduce similar results using curl.

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

How reproducible:

Intermittently.

Steps to Reproduce:
1. curl the apps in question. wait for a 504 to be returned
2.
3.

Actual results:

[root@pro-us-east-1-master-237b8 ~]# while true ; do for url in https://www.akoden.com/wp-admin/ https://www.africaaada.org/wp-admin/ https://www.2wheels2africa.com/wp-admin/; do date +"%H:%M:%S:%N" ; curl -I -s -o /dev/null -w "%{http_code} %{url_effective} %{time_total}"  $url ; echo; echo; sleep 0.5 ; done; done
20:04:54:822937055
302 https://www.akoden.com/wp-admin/ 0.823

20:04:56:155573211
302 https://www.africaaada.org/wp-admin/ 0.293

20:04:56:958509518
302 https://www.2wheels2africa.com/wp-admin/ 9.136

20:05:06:604051454
302 https://www.akoden.com/wp-admin/ 0.141

20:05:07:254769276
302 https://www.africaaada.org/wp-admin/ 0.267

20:05:08:031146206
302 https://www.2wheels2africa.com/wp-admin/ 9.057

20:05:17:598444682
302 https://www.akoden.com/wp-admin/ 0.108

20:05:18:215753222
302 https://www.africaaada.org/wp-admin/ 0.235

20:05:18:959940386
302 https://www.2wheels2africa.com/wp-admin/ 8.709

20:05:28:178727718
302 https://www.akoden.com/wp-admin/ 0.135

20:05:28:822944304
302 https://www.africaaada.org/wp-admin/ 0.232

20:05:29:563962651
302 https://www.2wheels2africa.com/wp-admin/ 10.075

20:05:40:148535046
302 https://www.akoden.com/wp-admin/ 0.687

20:05:41:344420138
302 https://www.africaaada.org/wp-admin/ 0.312

20:05:42:165488186
302 https://www.2wheels2africa.com/wp-admin/ 13.105

20:05:55:780398304
302 https://www.akoden.com/wp-admin/ 0.250

20:05:56:539534047
302 https://www.africaaada.org/wp-admin/ 0.696

20:05:57:744888505
504 https://www.2wheels2africa.com/wp-admin/ 30.635

20:06:28:890347452
302 https://www.akoden.com/wp-admin/ 0.159

20:06:29:558548836
302 https://www.africaaada.org/wp-admin/ 0.215

20:06:30:282796782
504 https://www.2wheels2africa.com/wp-admin/ 30.091

20:07:00:883421934
302 https://www.akoden.com/wp-admin/ 0.247

20:07:01:639413736
302 https://www.africaaada.org/wp-admin/ 0.261

20:07:02:409840511
504 https://www.2wheels2africa.com/wp-admin/ 30.196

20:07:33:115612071
302 https://www.akoden.com/wp-admin/ 0.123

20:07:33:747520348
302 https://www.africaaada.org/wp-admin/ 0.219

20:07:34:475948941
504 https://www.2wheels2africa.com/wp-admin/ 30.100

The 504 errors I got at 20:07:02 and 20:07:34 had no corresponding 504 in the app logs. The application received this as an HTTP 302, but curl received a 504.

[root@pro-us-east-1-master-237b8 ~]# oc logs africaaada-37-gx7s6 -n tenfourty |grep '20:07'
10.128.10.1 - - [16/May/2018:20:07:01 +0000] "HEAD /wp-admin/ HTTP/1.1" 302 - "-" "curl/7.29.0"
10.128.10.1 - - [16/May/2018:20:07:33 +0000] "HEAD /wp-admin/ HTTP/1.1" 302 - "-" "curl/7.29.0"

Expected results:

I should receive the same HTTP status code that is logged in the application logs.

Additional info:

Comment 1 Stefanie Forrester 2018-05-16 21:16:46 UTC
I just realized that this URL is behind cloudflare, which is returning the 504s...