Bug 1762040 - haproxy.template contains additional } in 3.11.129
Summary: haproxy.template contains additional } in 3.11.129
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 3.11.0
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
: 3.11.z
Assignee: Dan Mace
QA Contact: Hongan Li
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-10-15 22:56 UTC by Vladislav Walek
Modified: 2024-06-13 22:16 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-20 00:12:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift origin pull 24087 0 'None' closed Bug 1762040: Fix cosmetic template error 2021-02-15 04:14:09 UTC
Red Hat Knowledge Base (Solution) 6042051 0 None None None 2021-05-14 13:49:40 UTC
Red Hat Product Errata RHBA-2020:0793 0 None None None 2020-03-20 00:12:54 UTC

Description Vladislav Walek 2019-10-15 22:56:52 UTC
Description of problem:

The haproxy-config.template contains typo here:

    549   hash-type consistent
    550   timeout check 5000ms
    551     {{- range $serviceUnitName, $weight := $cfg.ServiceUnitNames }}
    552       {{- if ne $weight 0 }}}{{/* drop connections where weight=0 as we can't use cookies, leaving only r-r and src-ip as dispatch methods and weight make no sense there */}}

On line 552 there is additiona "}" which ends in the haproxy.config as follows:

  hash-type consistent
  timeout check 5000ms}


Version-Release number of selected component (if applicable):
OpenShift Container Platform 3.11
haproxy image 3.11.129

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Miciah Dashiel Butler Masters 2019-10-16 08:14:14 UTC
This issue was fixed in OCP 4.1 but has not been backported to OCP 3.11.  The change that would need to be backported is the following:  https://github.com/openshift/router/pull/20/commits/e9961a1eb712f79fbfe9c9b3d2902d833d784ea5

HAProxy ignores the extra brace, so the issue is cosmetic only.  I am therefore setting the priority to "low".

Comment 4 Arvind iyengar 2020-03-12 09:14:05 UTC
This issue has been fixed in version: "3.11.187" 

Details from the environment: 

* Release version: 
-----
oc v3.11.187
kubernetes v1.11.0+d4cacc0
openshift v3.11.187
kubernetes v1.11.0+d4cacc0
-----

* The current "haproxy-config.template" file for `hash-type` has no extra "}" :
-----
    547   hash-type consistent
    548   timeout check 5000ms
    549     {{- range $serviceUnitName, $weight := $cfg.ServiceUnitNames }}
    550       {{- if ne $weight 0 }}{{/* drop connections where weight=0 as we can't use cookies, leaving only r-r and src-ip as dispatch methods and weight make no sense there */}}
    551         {{- with $serviceUnit := index $.ServiceUnits $serviceUnitName }}
    552           {{- range $idx, $endpoint := processEndpointsForAlias $cfg $serviceUnit (env "ROUTER_BACKEND_PROCESS_ENDPOINTS" "") }}
-----
  - Previous one for reference that had the issue: 
    ----
    {{- if ne $weight 0 }}}{{/* drop connections where weight=0 as we can't use cookies, leaving only r-r and src-ip as dispatch methods and weight make no sense there */}}
                          ^
    ----


* The haproxy.config is now set properly:
-------
# Secure backend, pass through
backend be_tcp:default:registry-console
  balance source

  hash-type consistent
  timeout check 5000ms
  server pod:registry-console-1-fsl2t:registry-console:10.128.0.3:9090 10.128.0.3:9090 weight 256
-------

Comment 6 errata-xmlrpc 2020-03-20 00:12:40 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-2020:0793


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