Bug 1579729

Summary: [haproxy1.8.8] haproxy log shows warning message: 'option tcplog' directive is ignored in backends if set env ROUTER_SYSLOG_ADDRESS
Product: OpenShift Container Platform Reporter: Hongan Li <hongli>
Component: NetworkingAssignee: Jacob Tanenbaum <jtanenba>
Networking sub component: router QA Contact: Hongan Li <hongli>
Status: CLOSED ERRATA Docs Contact:
Severity: low    
Priority: medium CC: aghadge, aos-bugs, bperkins, dahernan, dmace, nbhatt
Version: 3.10.0   
Target Milestone: ---   
Target Release: 4.1.0   
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: 2019-06-04 10:40:21 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:
Attachments:
Description Flags
haprox.config none

Description Hongan Li 2018-05-18 08:13:00 UTC
Description of problem:
If set env ROUTER_SYSLOG_ADDRESS=127.0.0.1 for haproxy router, then find below warning message in haproxy log:
[WARNING] 137/030655 (42) : parsing [/var/lib/haproxy/conf/haproxy.config:185] : backend 'be_tcp:default:docker-registry' : 'option tcplog' directive is ignored in backends.
[WARNING] 137/030655 (42) : parsing [/var/lib/haproxy/conf/haproxy.config:194] : backend 'be_tcp:default:registry-console' : 'option tcplog' directive is ignored in backends.
[WARNING] 137/030655 (42) : parsing [/var/lib/haproxy/conf/haproxy.config:219] : backend 'be_tcp:kube-service-catalog:apiserver' : 'option tcplog' directive is ignored in backends.
[WARNING] 137/030655 (42) : parsing [/var/lib/haproxy/conf/haproxy.config:261] : backend 'be_tcp:lha:service-secure' : 'option tcplog' directive is ignored in backends.

Didn't see these warning messages when using haproxy 1.8.1.


Version-Release number of selected component (if applicable):
openshift v3.10.0-0.47.0
kubernetes v1.10.0+b81c8f8

haproxy18-1.8.8-1.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1. oc env dc/router ROUTER_SYSLOG_ADDRESS=127.0.0.1
2. oc logs router-x-xxxxx
3.

Actual results:
haproxy log shows warning messages for all passthrough routes (be_tcp)

Expected results:
should not shows warning messages in haproxy router log

Additional info:
looks it is harmless, but it shows repeatedly in log while router reloaded.

Comment 1 Hongan Li 2018-05-18 08:17:03 UTC
Created attachment 1438382 [details]
haprox.config

Comment 2 Hongan Li 2018-05-18 08:26:39 UTC
the warning message was also found in latest 3.9.29 version (haproxy 1.8.8), but not existed in v3.9.14 (haproxy 1.8.1). details as below:


# oc logs router-2-dbqgc 
I0518 07:52:13.320190       1 template.go:260] Starting template router (v3.9.29)
I0518 07:52:13.340079       1 metrics.go:157] Router health and metrics port listening at 0.0.0.0:1936
I0518 07:52:13.811996       1 router.go:441] Router reloaded:
[WARNING] 137/075213 (27) : parsing [/var/lib/haproxy/conf/haproxy.config:31] : 'option httplog' not usable with frontend 'public_ssl' (needs 'mode http'). Falling back to 'option tcplog'.
 - Checking http://localhost:80 ...
 - Health check ok : 0 retry attempt(s).
I0518 07:52:13.812046       1 router.go:228] Router is including routes in all namespaces
I0518 07:52:14.056946       1 router.go:441] Router reloaded:
[WARNING] 137/075214 (52) : parsing [/var/lib/haproxy/conf/haproxy.config:203] : backend 'be_tcp:default:docker-registry' : 'option tcplog' directive is ignored in backends.
[WARNING] 137/075214 (52) : parsing [/var/lib/haproxy/conf/haproxy.config:213] : backend 'be_tcp:default:registry-console' : 'option tcplog' directive is ignored in backends.
[WARNING] 137/075214 (52) : parsing [/var/lib/haproxy/conf/haproxy.config:238] : backend 'be_tcp:kube-service-catalog:apiserver' : 'option tcplog' directive is ignored in backends.
[WARNING] 137/075214 (52) : parsing [/var/lib/haproxy/conf/haproxy.config:31] : 'option httplog' not usable with frontend 'public_ssl' (needs 'mode http'). Falling back to 'option tcplog'.
 - Checking http://localhost:80 ...
 - Health check ok : 0 retry attempt(s).

sh-4.2$ rpm -qa | grep haproxy
haproxy18-1.8.8-1.el7.x86_64

------------------------------------------
# oc logs router-3-mm8wg 
I0518 07:55:34.752653       1 template.go:260] Starting template router (v3.9.14)
I0518 07:55:34.757202       1 metrics.go:157] Router health and metrics port listening at 0.0.0.0:1936
I0518 07:55:35.087907       1 router.go:441] Router reloaded:
[WARNING] 137/075534 (26) : parsing [/var/lib/haproxy/conf/haproxy.config:31] : 'option httplog' not usable with frontend 'public_ssl' (needs 'mode http'). Falling back to 'option tcplog'.
 - Checking http://localhost:80 ...
 - Health check ok : 0 retry attempt(s).

sh-4.2$ rpm -qa | grep haproxy
haproxy18-1.8.1-5.el7.x86_64

note: the issue of warning message 'option httplog' not usable with frontend 'public_ssl' was tracked by BZ:https://bugzilla.redhat.com/show_bug.cgi?id=1533346

Comment 3 Ben Bennett 2018-05-18 14:10:54 UTC
It looks like haproxy is going something strange here.  It looks like we are setting the option correctly in the attached haproxy.conf.  We need to check that the given conf file produces the error message with haproxy 1.8.8 and then confirm we are setting the option correctly, then take the bug upstream.

Comment 4 Jacob Tanenbaum 2018-05-24 13:35:28 UTC
according to the haproxy documentation for 1.8  

https://cbonte.github.io/haproxy-dconv/1.8/configuration.html#option%20tcplog


option tcplog cannot be used in the backends, this is a change from haproxy 1.7. I will update the template removing this from the backends.

Comment 7 Hongan Li 2019-02-19 06:06:20 UTC
verified with 4.0.0-0.nightly-2019-02-17-024922 and issue has been fixed.

router image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:ff083c191ebc70ebbdcbf352dc059c72b0184f6dc65858f5926a9b220ad8f475

Comment 10 errata-xmlrpc 2019-06-04 10:40:21 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-2019:0758