Bug 1887935 - TestForwardedHeaderPolicyAppend, TestForwardedHeaderPolicyReplace, and TestForwardedHeaderPolicyIfNone consistently fail because of case-sensitive comparison
Summary: TestForwardedHeaderPolicyAppend, TestForwardedHeaderPolicyReplace, and TestFo...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 4.6
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 4.6.z
Assignee: Miciah Dashiel Butler Masters
QA Contact: Arvind iyengar
URL:
Whiteboard:
Depends On: 1887934
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-10-13 15:38 UTC by OpenShift BugZilla Robot
Modified: 2022-08-04 22:30 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-16 14:37:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift cluster-ingress-operator pull 475 0 None closed [release-4.6] Bug 1887935: TestForwardedHeaderPolicy*: Make case-insensitive 2020-11-09 03:55:50 UTC
Red Hat Product Errata RHBA-2020:4987 0 None None None 2020-11-16 14:37:58 UTC

Description OpenShift BugZilla Robot 2020-10-13 15:38:04 UTC
+++ This bug was initially created as a clone of Bug #1887934 +++

Description of problem:

4.6 adds the Forwarded header policy API.  This feature has E2E tests in cluster-ingress-operator to verify that the expected headers are set.  The tests use a case-sensitive comparison and scan for the headers using their lower-cased names.  

https://github.com/openshift/router/pull/194 turns off HAProxy's HTX option when HTTP/2 is not enabled.  As a result, HAProxy does not down-case HTTP header names.  

The E2E tests need to ignore case when comparing the expected response and the actual response because some cloud load balancers use mixed-case header names (e.g., an ELB sets "X-Forwarded-For", and the test looks for "x-forwarded-for").  


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

The E2E tests were added in 4.6.  
https://github.com/openshift/router/pull/194 turns off  HTX in 4.7.  


How reproducible:

This was reliably causing failures in CI.  


Steps to Reproduce:
1. Go to a recent cluster-ingress-operator CI run.  
2. Check for failures.  


Actual results:

The build log reports the following failures:

--- FAIL: TestForwardedHeaderPolicyAppend (259.87s)
--- FAIL: TestForwardedHeaderPolicyReplace (262.63s)
--- FAIL: TestForwardedHeaderPolicyIfNone (263.60s)


Expected results:

The build log should not show these failures.


Additional info:

I already fixed the tests in cluster-ingress-operator but am reporting the issue in Bugzilla in order to facility a backport of the test fix to 4.6 because https://github.com/openshift/router/pull/199 (not merged) turns off HTX in 4.6.

Comment 1 Miciah Dashiel Butler Masters 2020-10-13 15:45:45 UTC
Setting severity high to fix priority inversion: bug 1886213 is high severity and depends on this bug.

Comment 2 Miciah Dashiel Butler Masters 2020-10-26 05:03:55 UTC
Fix is posted and awaiting cherry-pick-approved label.  We'll try to get this done in the upcoming sprint.

Comment 4 Arvind iyengar 2020-11-09 04:00:38 UTC
Verified in subsequent CI runs after the fix, the failure is no more seen.

Comment 7 errata-xmlrpc 2020-11-16 14:37:42 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.4 bug fix update), 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:4987


Note You need to log in before you can comment on or make changes to this bug.