From a951c1a3f0a34e086964f52b0bbf7a8d89481aad Mon Sep 17 00:00:00 2001 From: Niko Smeds Date: Thu, 5 Mar 2020 14:24:56 -0800 Subject: [PATCH] Enable HAProxy backend checks for Ceph RGW 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 --- roles/ceph-rgw-loadbalancer/templates/haproxy.cfg.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/ceph-rgw-loadbalancer/templates/haproxy.cfg.j2 b/roles/ceph-rgw-loadbalancer/templates/haproxy.cfg.j2 index 0fea9ab52..65bd79186 100644 --- a/roles/ceph-rgw-loadbalancer/templates/haproxy.cfg.j2 +++ b/roles/ceph-rgw-loadbalancer/templates/haproxy.cfg.j2 @@ -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 %} -- 2.39.5