From f1f4c0682a0b5767236cb91349b12c17cf14b141 Mon Sep 17 00:00:00 2001 From: avanthakkar Date: Thu, 5 Oct 2023 17:48:34 +0530 Subject: [PATCH] mgr/cephadm is not defining haproxy tcp healthchecks for Ganesha Fixes: https://tracker.ceph.com/issues/62638 Signed-off-by: avanthakkar (cherry picked from commit 6a6a9ddd46e5dd2135dfd241fc0dff8ff7472a06) --- .../mgr/cephadm/templates/services/ingress/haproxy.cfg.j2 | 2 +- src/pybind/mgr/cephadm/tests/test_services.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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 100acce401b..c114a8cba11 100644 --- a/src/pybind/mgr/cephadm/templates/services/ingress/haproxy.cfg.j2 +++ b/src/pybind/mgr/cephadm/templates/services/ingress/haproxy.cfg.j2 @@ -85,6 +85,6 @@ backend backend default-server {{ default_server_opts|join(" ") }} {% endif %} {% for server in servers %} - server {{ server.name }} {{ server.ip }}:{{ server.port }} + server {{ server.name }} {{ server.ip }}:{{ server.port }} check {% endfor %} {% endif %} diff --git a/src/pybind/mgr/cephadm/tests/test_services.py b/src/pybind/mgr/cephadm/tests/test_services.py index dbab022058d..b6d47a8df0a 100644 --- a/src/pybind/mgr/cephadm/tests/test_services.py +++ b/src/pybind/mgr/cephadm/tests/test_services.py @@ -1650,7 +1650,7 @@ class TestIngressService: ) if enable_haproxy_protocol: haproxy_txt += ' default-server send-proxy-v2\n' - haproxy_txt += ' server nfs.foo.0 192.168.122.111:12049\n' + haproxy_txt += ' server nfs.foo.0 192.168.122.111:12049 check\n' haproxy_expected_conf = { 'files': {'haproxy.cfg': haproxy_txt} } @@ -2428,7 +2428,7 @@ class TestIngressService: ' balance source\n' ' hash-type consistent\n' ' default-server send-proxy-v2\n' - ' server nfs.foo.0 192.168.122.111:12049\n' + ' server nfs.foo.0 192.168.122.111:12049 check\n' ) haproxy_expected_conf = { 'files': {'haproxy.cfg': haproxy_txt} -- 2.39.5