From cc6ac0f635308cff24337cd7f0a99616126f5835 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 137dc1157edf9..cb84f1d072226 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 c722dceabbf94..c7432e9285ddd 100644 --- a/src/pybind/mgr/cephadm/tests/test_services.py +++ b/src/pybind/mgr/cephadm/tests/test_services.py @@ -769,6 +769,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