From cd1872b157d24b684406e3efae20460350f95098 Mon Sep 17 00:00:00 2001 From: Shweta Bhosale Date: Tue, 4 Nov 2025 19:24:27 +0530 Subject: [PATCH] mgr/cephadm: increase default backend health check interval for NFS Fixes: https://tracker.ceph.com/issues/73712 Signed-off-by: Shweta Bhosale --- src/pybind/mgr/cephadm/services/ingress.py | 2 +- .../mgr/cephadm/templates/services/ingress/haproxy.cfg.j2 | 2 +- src/pybind/mgr/cephadm/tests/services/test_ingress.py | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pybind/mgr/cephadm/services/ingress.py b/src/pybind/mgr/cephadm/services/ingress.py index 58d3d7af72ad..59288256aa5f 100644 --- a/src/pybind/mgr/cephadm/services/ingress.py +++ b/src/pybind/mgr/cephadm/services/ingress.py @@ -271,7 +271,7 @@ class IngressService(CephService): 'frontend_port': frontend_port, 'monitor_port': spec.monitor_port, 'default_server_opts': server_opts, - 'health_check_interval': spec.health_check_interval or '2s', + 'health_check_interval': spec.health_check_interval or ('30s' if backend_spec.service_type == 'nfs' else '2s'), 'v4v6_flag': v4v6_flag, 'monitor_ssl_file': monitor_ssl_file, 'peer_hosts': peer_hosts, 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 67658d5522bf..addef5985744 100644 --- a/src/pybind/mgr/cephadm/templates/services/ingress/haproxy.cfg.j2 +++ b/src/pybind/mgr/cephadm/templates/services/ingress/haproxy.cfg.j2 @@ -114,6 +114,6 @@ backend backend {% endfor %} {% else %} {% for server in servers %} - server {{ server.name }} {{ server.ip }}:{{ server.port }} check + server {{ server.name }} {{ server.ip }}:{{ server.port }} check inter {{ health_check_interval }} {% endfor %} {% endif %} diff --git a/src/pybind/mgr/cephadm/tests/services/test_ingress.py b/src/pybind/mgr/cephadm/tests/services/test_ingress.py index 2c2c25aa2cba..98822ed7d18b 100644 --- a/src/pybind/mgr/cephadm/tests/services/test_ingress.py +++ b/src/pybind/mgr/cephadm/tests/services/test_ingress.py @@ -131,7 +131,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 check\n' + haproxy_txt += ' server nfs.foo.0 192.168.122.111:12049 check inter 30s\n' haproxy_expected_conf = { 'files': {'haproxy.cfg': haproxy_txt} } @@ -1035,7 +1035,7 @@ class TestIngressService: ' stick on src\n' ' hash-type consistent\n' ' default-server send-proxy-v2\n' - ' server nfs.foo.0 192.168.122.111:12049 check\n' + ' server nfs.foo.0 192.168.122.111:12049 check inter 30s\n' ) haproxy_expected_conf = { 'files': {'haproxy.cfg': haproxy_txt} @@ -1283,7 +1283,7 @@ class TestIngressService: ), ) gen_config_lines = haproxy_generated_conf['files']['haproxy.cfg'] - assert 'server nfs.foo.0 10.10.2.20:12049 check' in gen_config_lines + assert 'server nfs.foo.0 10.10.2.20:12049 check inter 30s' in gen_config_lines nfs_generated_conf, _ = nfs_svc.generate_config( CephadmDaemonDeploySpec( -- 2.47.3