From 00417b6856a4dd6363e85df95af67202d95c1529 Mon Sep 17 00:00:00 2001 From: Georgina Shippey Date: Wed, 14 Aug 2019 16:16:21 +0100 Subject: [PATCH] Ceph-RGW HAProxy config skipped when shouldnt Now that group ceph-rgw is in the default inventory (commit c700fdba) the logic for haproxy_backend_nodes would always select the group 'ceph-rgw' as it will always be defined, regardless of length. If using the ceph_rgws variable instead of the ceph-rgws group it meant that the haproxy_backend_nodes equated to an empty group. So the 'when' criteria in haproxy_service_config.yml did not get met and the services config was not provisioned. This fix checks the length of the ceph-rgws group. If its not greater than zero, haproxy_backend_nodes is defaulted back to ceph_rgws. Change-Id: I7ac3e3ba9e64b38ec22704394fcd5f402dd9d7f8 --- inventory/group_vars/haproxy/haproxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inventory/group_vars/haproxy/haproxy.yml b/inventory/group_vars/haproxy/haproxy.yml index 6510a7e850..2b3ec98184 100644 --- a/inventory/group_vars/haproxy/haproxy.yml +++ b/inventory/group_vars/haproxy/haproxy.yml @@ -363,7 +363,7 @@ haproxy_default_services: haproxy_service_enabled: "{{ neutron_plugin_type == 'ml2.opendaylight' }}" - service: haproxy_service_name: ceph-rgw - haproxy_backend_nodes: "{{ groups['ceph-rgw'] | default(ceph_rgws) }}" + haproxy_backend_nodes: "{{ (groups['ceph-rgw'] is defined and groups['ceph-rgw'] | length > 0) | ternary(groups['ceph-rgw'], ceph_rgws) }}" haproxy_ssl: "{{ haproxy_ssl }}" haproxy_balance_alg: source haproxy_port: "{{ radosgw_service_port | default(7980) }}"