OpenShift Container Platform 4 router fails with a route referencing a service with duplicate targetPort values
Issue
-
When creating a service that has two frontend listeners pointing to the same backend
targetPort
, ingress routerHAProxy
ends up with Fatal errors found in configuration and can't reload new configuration. In theHAProxy
logs the following error is reported:E0325 11:37:02.047414 1 limiter.go:165] error reloading router: exit status 1 [ALERT] 083/113702 (3500) : parsing [/var/lib/haproxy/conf/haproxy.config:641] : backend 'be_edge_http:foo:bar', another server named 'pod:bar-12345678-12345:bar-service:10.1.1.1:9091' was already defined at line 640, please use distinct names. [ALERT] 083/113702 (3500) : parsing [/var/lib/haproxy/conf/haproxy.config:660] : backend 'be_edge_http:foo:bar-log', another server named 'pod:bar-12345678-12345:bar-service:10.1.1.1:9091' was already defined at line 659, please use distinct names.
Environment
- Red Hat OpenShift Container Platform (RHOCP) 4.5
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.