Hide Forgot
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.
Created attachment 1438382 [details] haprox.config
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
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.
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.
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
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