Bug 1443668

Summary: [3.5] HAProxy router's request buffer is too small
Product: OpenShift Container Platform Reporter: Miciah Dashiel Butler Masters <mmasters>
Component: NetworkingAssignee: Miciah Dashiel Butler Masters <mmasters>
Networking sub component: router QA Contact: zhaozhanqi <zzhao>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: unspecified CC: aos-bugs, bbennett, bperkins, eparis, jeder, jmencak, yadu, zzhao
Version: 3.5.1   
Target Milestone: ---   
Target Release: 3.5.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: aos-scalability-36
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1443665
: 1443675 1457317 (view as bug list) Environment:
Last Closed: 2017-06-15 18:37:42 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:
Bug Depends On:    
Bug Blocks: 1457317    

Description Miciah Dashiel Butler Masters 2017-04-19 16:53:56 UTC
Description of problem:

HAProxy's default request buffer configuration only allows 8192 bytes for headers in incoming requests.  This limit is too low.

haproxy-config.template does not specify tune.bufsize or tune.maxrewrite.  The default value for tune.bufsize is 16384 bytes.  The default value for tune.maxrewrite is half of tune.bufsize.  Incoming request headers are limited to the difference, tune.bufsize - tune.maxrewrite, thus 8192 bytes, by default.


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

v3.5.5.7


Steps to reproduce:

The problem can be demonstrated with the following command:

    curl "http://${some_route}/" -H "X-Foo: $(perl -e 'print "x"x8192')"


Actual results:

HAProxy responds with "400 Bad request".


Expected results:

HAProxy should return a 200 response.


Additional information:

PR: https://github.com/openshift/ose/pull/714

Comment 3 Yan Du 2017-06-05 06:47:24 UTC
Test on OCP 3.5 env
openshift v3.5.5.23
kubernetes v1.5.2+43a9be4

$ curl "http://test-service-d2.0605-rnv.qe.rhcloud.com/" -H "X-Foo: $(perl -e 'print "x"x8192')"
Hello OpenShift!

Comment 5 errata-xmlrpc 2017-06-15 18: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, 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-2017:1425