Bug 1762040

Summary: haproxy.template contains additional } in 3.11.129
Product: OpenShift Container Platform Reporter: Vladislav Walek <vwalek>
Component: NetworkingAssignee: Dan Mace <dmace>
Networking sub component: router QA Contact: Hongan Li <hongli>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: low CC: aiyengar, aos-bugs, atn, bperkins, mmasters
Version: 3.11.0   
Target Milestone: ---   
Target Release: 3.11.z   
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-03-20 00:12:40 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 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