From: Guillaume Abrioux Date: Fri, 11 Feb 2022 16:39:18 +0000 (+0100) Subject: cephadm/ingress: make frontend stat bind on localhost X-Git-Tag: v18.0.0~1384^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F45014%2Fhead;p=ceph.git cephadm/ingress: make frontend stat bind on localhost The current configuration of keepalived makes it do a curl on localhost:9999 in order to check the endpoint is alive. Given the endpoint only binds on the vip addr, that doesn't work. Fixes: https://tracker.ceph.com/issues/53807 Signed-off-by: Guillaume Abrioux --- diff --git a/src/pybind/mgr/cephadm/templates/services/ingress/haproxy.cfg.j2 b/src/pybind/mgr/cephadm/templates/services/ingress/haproxy.cfg.j2 index 137dc1157edf..cb84f1d07222 100644 --- a/src/pybind/mgr/cephadm/templates/services/ingress/haproxy.cfg.j2 +++ b/src/pybind/mgr/cephadm/templates/services/ingress/haproxy.cfg.j2 @@ -48,6 +48,7 @@ defaults frontend stats mode http bind {{ ip }}:{{ monitor_port }} + bind localhost:{{ monitor_port }} stats enable stats uri /stats stats refresh 10s diff --git a/src/pybind/mgr/cephadm/tests/test_services.py b/src/pybind/mgr/cephadm/tests/test_services.py index 71a1307ac400..6f0f81c03b21 100644 --- a/src/pybind/mgr/cephadm/tests/test_services.py +++ b/src/pybind/mgr/cephadm/tests/test_services.py @@ -759,6 +759,7 @@ class TestIngressService: '\nfrontend stats\n ' 'mode http\n ' 'bind 1.2.3.4:8999\n ' + 'bind localhost:8999\n ' 'stats enable\n ' 'stats uri /stats\n ' 'stats refresh 10s\n '