]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: Fixed stats frontend to always enable health url 64194/head
authorShweta Bhosale <Shweta.Bhosale1@ibm.com>
Tue, 23 Sep 2025 16:33:05 +0000 (22:03 +0530)
committerShweta Bhosale <Shweta.Bhosale1@ibm.com>
Thu, 25 Sep 2025 16:42:12 +0000 (22:12 +0530)
Fixes: https://tracker.ceph.com/issues/71707
Signed-off-by: Shweta Bhosale <Shweta.Bhosale1@ibm.com>
src/pybind/mgr/cephadm/templates/services/ingress/haproxy.cfg.j2
src/pybind/mgr/cephadm/tests/test_services.py

index 943ed969ad7c2780dabd4ed74c2d9f4941b543f7..997620b369cc19b116750984867d39b2cb83278b 100644 (file)
@@ -45,7 +45,6 @@ defaults
 {% endif %}
     maxconn                 8000
 
-{% if spec.enable_stats %}
 frontend stats
     mode http
 {% for monitor_ip in monitor_ips %}
@@ -55,14 +54,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 902be51286e72526e2a34b96e58f86e3ef386810..f5eb56d7530a5002e31a3918f2f4725eb6cdd655 100644 (file)
@@ -4001,6 +4001,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'