]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/cephadm: Fixed stats frontend to always enable health url
authorShweta Bhosale <Shweta.Bhosale1@ibm.com>
Tue, 23 Sep 2025 16:33:05 +0000 (22:03 +0530)
committerAdam King <adking@redhat.com>
Thu, 25 Sep 2025 21:05:57 +0000 (17:05 -0400)
Fixes: https://tracker.ceph.com/issues/71707
Signed-off-by: Shweta Bhosale <Shweta.Bhosale1@ibm.com>
(cherry picked from commit 4cf55bdb9e541a62c01286729125bf1e0a6178b2)

Resolves: rhbz#2353516

src/pybind/mgr/cephadm/templates/services/ingress/haproxy.cfg.j2
src/pybind/mgr/cephadm/tests/test_services.py

index 570839893964f088810c4f0a9b876c92c7df8fb5..6e6c076dac6c7b3cf812504668cc8b7c3e006e2b 100644 (file)
@@ -49,7 +49,6 @@ defaults
 {% endif %}
     maxconn                 8000
 
-{% if spec.enable_stats %}
 frontend stats
     mode http
 {% for monitor_ip in monitor_ips %}
@@ -59,14 +58,15 @@ frontend stats
     bind {{ monitor_ip }}:{{ monitor_port }}
     {% endif %}
 {% endfor %}
+{% if spec.enable_stats %}
     stats enable
     stats uri /stats
     stats refresh 10s
     stats auth {{ user }}:{{ password }}
     http-request use-service prometheus-exporter if { path /metrics }
+{% endif %}
     monitor-uri /health
 
-{% endif %}
 frontend frontend
 {% if spec.ssl or spec.ssl_cert %}
     bind {{ ip }}:{{ frontend_port }} ssl crt /var/lib/haproxy/haproxy.pem {{ v4v6_flag }}
index 6a628aef120195581ed4d6cb35b3763d2912965e..c22e38ca51895a92e12f6699d410270c203a5e0c 100644 (file)
@@ -4154,6 +4154,11 @@ class TestNFS:
                                 'timeout server          30s\n    '
                                 'timeout check           5s\n    '
                                 'maxconn                 8000\n'
+                                '\nfrontend stats\n'
+                                '    mode http\n'
+                                '    bind 1.2.3.4:8999\n'
+                                '    bind 1.2.3.7:8999\n'
+                                '    monitor-uri /health\n'
                                 '\nfrontend frontend\n    '
                                 'bind 1.2.3.4:8089\n    '
                                 'default_backend backend\n\n'