Bug 1443665 - [3.4] HAProxy router's request buffer is too small
Summary: [3.4] HAProxy router's request buffer is too small
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 3.4.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 3.4.z
Assignee: Miciah Dashiel Butler Masters
QA Contact: zhaozhanqi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-19 16:33 UTC by Miciah Dashiel Butler Masters
Modified: 2022-08-04 22:20 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1443668 (view as bug list)
Environment:
Last Closed: 2017-04-26 05:38:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift ose pull 715 0 None None None 2020-08-26 06:24:22 UTC
Red Hat Product Errata RHBA-2017:1129 0 normal SHIPPED_LIVE OpenShift Container Platform 3.5, 3.4, 3.3, and 3.2 bug fix update 2017-04-26 09:35:35 UTC

Description Miciah Dashiel Butler Masters 2017-04-19 16:33:14 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.4.1.9


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.

Comment 1 Miciah Dashiel Butler Masters 2017-04-19 16:57:09 UTC
PR: https://github.com/openshift/ose/pull/715

Comment 2 Troy Dawson 2017-04-20 15:57:39 UTC
This has been merged into ocp and is in OCP v3.4.1.18 or newer.

Comment 4 zhaozhanqi 2017-04-21 06:51:11 UTC
verified this bug on v3.4.1.18

steps:

1. Create app/service/route. eg. route=service-unsecure-default.0421-tsj.qe.rhcloud.com
2.
 curl "http://${route}/" -H "X-Foo: $(perl -e 'print "x"x8192')"
Hello-OpenShift-1 http-8080

Comment 6 Jeremy Eder 2017-04-25 19:57:41 UTC
Can we do a release note talking about the non-trivial amount of increased memory usage documented in the github issue?

https://github.com/openshift/origin/pull/13792#issuecomment-297079755

Comment 7 errata-xmlrpc 2017-04-26 05:38:24 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:1129


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