Skip to content

Commit

Permalink
Enable HAProxy backend checks for Ceph RGW
Browse files Browse the repository at this point in the history
Add the `check` option to server definitions to enable basic HAProxy health
checks for Ceph RADOS gateway backends.

Currently traffic will be forwarded to unhealthly `radosgw.service` servers.
These changes resolve the issue.

Signed-off-by: Niko Smeds nikosmeds@gmail.com
(cherry picked from commit a951c1a)
  • Loading branch information
nikosmeds authored and dsavineau committed Sep 2, 2020
1 parent 3a8be20 commit a41c572
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions roles/ceph-rgw-loadbalancer/templates/haproxy.cfg.j2
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ frontend rgw-frontend
backend rgw-backend
option forwardfor
balance static-rr
option httpchk Get /
option httpchk HEAD /
{% for host in groups[rgw_group_name] %}
{% for instance in hostvars[host]['rgw_instances'] %}
server {{ 'server-' + hostvars[host]['ansible_hostname'] + '-' + instance['instance_name'] }} {{ instance['radosgw_address'] }}:{{ instance['radosgw_frontend_port'] }} weight 100
server {{ 'server-' + hostvars[host]['ansible_hostname'] + '-' + instance['instance_name'] }} {{ instance['radosgw_address'] }}:{{ instance['radosgw_frontend_port'] }} weight 100 check
{% endfor %}
{% endfor %}

0 comments on commit a41c572

Please sign in to comment.