Bug 1579729 - [haproxy1.8.8] haproxy log shows warning message: 'option tcplog' directive is ignored in backends if set env ROUTER_SYSLOG_ADDRESS
Summary: [haproxy1.8.8] haproxy log shows warning message: 'option tcplog' directive i...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 3.10.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: 4.1.0
Assignee: Jacob Tanenbaum
QA Contact: Hongan Li
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-18 08:13 UTC by Hongan Li
Modified: 2023-03-24 14:05 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-06-04 10:40:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
haprox.config (12.21 KB, text/plain)
2018-05-18 08:17 UTC, Hongan Li
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Origin (Github) 19840 0 None None None 2018-05-24 17:48:56 UTC
Red Hat Bugzilla 1748814 0 unspecified CLOSED Backport request of BZ#1579729 haproxy log shows warning message: 'option tcplog' directive is ignored in backends 2022-08-04 22:24:08 UTC
Red Hat Knowledge Base (Solution) 4598911 0 None None None 2019-11-20 07:07:16 UTC
Red Hat Product Errata RHBA-2019:0758 0 None None None 2019-06-04 10:40:28 UTC

Internal Links: 1748814

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


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