From ff482da6cb3a62b14f3a06e2d558876eabebfe65 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Fri, 11 Feb 2022 17:39:18 +0100 Subject: [PATCH] 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 --- src/pybind/mgr/cephadm/templates/services/ingress/haproxy.cfg.j2 | 1 + src/pybind/mgr/cephadm/tests/test_services.py | 1 + 2 files changed, 2 insertions(+) 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 137dc1157ed..cb84f1d0722 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 71a1307ac40..6f0f81c03b2 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 ' -- 2.39.5