Bug 1872557

Summary: release-4.6: Insights Operator handles well Http Success Codes 2xx
Product: OpenShift Container Platform Reporter: Martin Kunc <mkunc>
Component: Insights OperatorAssignee: Martin Kunc <mkunc>
Status: CLOSED ERRATA QA Contact: Pavel Šimovec <psimovec>
Severity: high Docs Contact: Marc Muehlfeld <mmuehlfe>
Priority: medium    
Version: 4.6CC: aos-bugs, avicenzi, inecas, tremes
Target Milestone: ---   
Target Release: 4.6.0   
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: 2020-10-27 16:33:37 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 Martin Kunc 2020-08-26 04:28:57 UTC
Insights operator should react well to Ingress Upload Http status Codes.
Today, IO turns itself into degraded state when it receives 201 instead of 200.
According to RFC all 2xx codes are valid Success responses.

We should handle Success codes gracefully, operator shouldn't be failing.

Comment 3 Pavel Šimovec 2020-09-29 07:30:13 UTC
we get by default 201 success code instad of 200, and upload would not work whole month if change in this BZ did not work

Comment 4 Pavel Šimovec 2020-09-29 07:35:40 UTC
(needs additional check)

Comment 5 Pavel Šimovec 2020-09-30 07:59:55 UTC
created upload server following steps in https://docs.engineering.redhat.com/pages/viewpage.action?spaceKey=CCXDEV&title=How+to+create+testing+upload+server
just changed response to 303

IO did not receive 2XX response, so it reacted as expected:

I0930 07:31:48.079113       1 status.go:249] The operator has some internal errors: Unable to report: unable to build request to connect to Insights server: Post "http://10.131.0.28:8081": 303 response missing Location header

changed response to 299 and followed the steps again

I0930 07:49:42.723861       1 insightsclient.go:164] Uploading application/vnd.redhat.openshift.periodic to http://10.131.0.36:8081
I0930 07:49:42.725786       1 insightsuploader.go:159] Uploaded report successfully in 9.131153ms

verified in 4.6.0-0.nightly-2020-09-28-061045

Comment 7 errata-xmlrpc 2020-10-27 16:33:37 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (OpenShift Container Platform 4.6 GA Images), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:4196