From 6ce22755108ab91de8c2b9a57ca8ce6940126202 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Sat, 4 Sep 2021 10:51:00 -0700 Subject: [PATCH] haproxy: ocp cluster is only in iad2 If we push this to all proxies (as we have), they will fail to start haproxy because they cannot resolve the internal ocp iad2 hosts. ;( The ocp clusters should only apply on the iad2 haproxy nodes, not all proxies. Also fix logic on the staging one to apply in staging instead of just production. Signed-off-by: Kevin Fenzi --- roles/haproxy/templates/haproxy.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/haproxy/templates/haproxy.cfg b/roles/haproxy/templates/haproxy.cfg index d90db19b14..56af90b0f1 100644 --- a/roles/haproxy/templates/haproxy.cfg +++ b/roles/haproxy/templates/haproxy.cfg @@ -37,7 +37,7 @@ backend stats-backend stats enable stats uri / -{% if env == "production" %} +{% if env == "production" and 'iad2' in inventory_hostname %} frontend ocp-masters-kapi mode tcp bind 0.0.0.0:6443 @@ -65,7 +65,7 @@ backend ocp-masters-backend-machineconfig server bootstrap.ocp.iad2.fedoraproject.org bootstrap.ocp.iad2.fedoraproject.org:22623 weight 1 maxconn 16384 check {% endif %} -{% if env != "production" %} +{% if env != "production" and 'iad2' in inventory_hostname %} frontend ocp-masters-kapi mode tcp bind 0.0.0.0:6443