Skip to content

Commit 4cf55bd

Browse files
mgr/cephadm: Fixed stats frontend to always enable health url
Fixes: https://tracker.ceph.com/issues/71707 Signed-off-by: Shweta Bhosale <[email protected]>
1 parent da5d3ab commit 4cf55bd

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ defaults
4545
{% endif %}
4646
maxconn 8000
4747

48-
{% if spec.enable_stats %}
4948
frontend stats
5049
mode http
5150
{% for monitor_ip in monitor_ips %}
@@ -55,14 +54,15 @@ frontend stats
5554
bind {{ monitor_ip }}:{{ monitor_port }}
5655
{% endif %}
5756
{% endfor %}
57+
{% if spec.enable_stats %}
5858
stats enable
5959
stats uri /stats
6060
stats refresh 10s
6161
stats auth {{ user }}:{{ password }}
6262
http-request use-service prometheus-exporter if { path /metrics }
63+
{% endif %}
6364
monitor-uri /health
6465

65-
{% endif %}
6666
frontend frontend
6767
{% if spec.ssl or spec.ssl_cert %}
6868
bind {{ ip }}:{{ frontend_port }} ssl crt /var/lib/haproxy/haproxy.pem {{ v4v6_flag }}

src/pybind/mgr/cephadm/tests/test_services.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4001,6 +4001,11 @@ def test_ingress_without_haproxy_stats(self, _run_cephadm, cephadm_module: Cepha
40014001
'timeout server 30s\n '
40024002
'timeout check 5s\n '
40034003
'maxconn 8000\n'
4004+
'\nfrontend stats\n'
4005+
' mode http\n'
4006+
' bind 1.2.3.4:8999\n'
4007+
' bind 1.2.3.7:8999\n'
4008+
' monitor-uri /health\n'
40044009
'\nfrontend frontend\n '
40054010
'bind 1.2.3.4:8089\n '
40064011
'default_backend backend\n\n'

0 commit comments

Comments
 (0)