Skip to content

Commit aab2b26

Browse files
authored
Merge pull request ceph#62166 from rkachach/fix_issue_70352
mgr/cephadm: use ip_hash to enforce the same prometheues upstream Reviewed-by: Adam King <[email protected]>
2 parents 18826ae + bfcb533 commit aab2b26

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/pybind/mgr/cephadm/templates/services/mgmt-gateway/nginx.conf.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ http {
5252

5353
{% if prometheus_endpoints %}
5454
upstream prometheus_servers {
55+
ip_hash;
5556
{% for ep in prometheus_endpoints %}
5657
server {{ ep }};
5758
{% endfor %}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4063,6 +4063,7 @@ def get_services_endpoints(name):
40634063
}
40644064
40654065
upstream prometheus_servers {
4066+
ip_hash;
40664067
server 192.168.100.100:9095;
40674068
server 192.168.100.101:9095;
40684069
}
@@ -4315,6 +4316,7 @@ def get_services_endpoints(name):
43154316
}
43164317
43174318
upstream prometheus_servers {
4319+
ip_hash;
43184320
server 192.168.100.100:9095;
43194321
server 192.168.100.101:9095;
43204322
}

0 commit comments

Comments
 (0)