mirror of https://github.com/ceph/ceph-ansible.git
dashboad: rgw frontends entries in ceph.conf are incorrect
There was multiple rgw frontends entries while there was just one
rgw instance on each host. The other entries were the details from
the other rgw hosts in the cluster
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2232282
Signed-off-by: Teoman ONAY <tonay@ibm.com>
(cherry picked from commit 490ca79ccc
)
pull/7469/head
parent
3f15340909
commit
b82a6ed1a7
|
@ -63,16 +63,22 @@
|
||||||
run_once: true
|
run_once: true
|
||||||
when: ip_version == 'ipv6'
|
when: ip_version == 'ipv6'
|
||||||
|
|
||||||
- name: set_fact rgw_instances without rgw multisite
|
- name: rgw_instances without rgw multisite
|
||||||
set_fact:
|
|
||||||
rgw_instances: "{{ rgw_instances|default([]) | union([{'instance_name': 'rgw' + item|string, 'radosgw_address': hostvars[ceph_dashboard_call_item | default(inventory_hostname)]['_radosgw_address'], 'radosgw_frontend_port': radosgw_frontend_port|int + item|int }]) }}"
|
|
||||||
with_sequence: start=0 end={{ radosgw_num_instances|int - 1 }}
|
|
||||||
delegate_to: "{{ ceph_dashboard_call_item if ceph_dashboard_call_item is defined else inventory_hostname }}"
|
|
||||||
delegate_facts: "{{ true if ceph_dashboard_call_item is defined else false }}"
|
|
||||||
when:
|
when:
|
||||||
- ceph_dashboard_call_item is defined or
|
- ceph_dashboard_call_item is defined or
|
||||||
inventory_hostname in groups.get(rgw_group_name, [])
|
inventory_hostname in groups.get(rgw_group_name, [])
|
||||||
- not rgw_multisite | bool
|
- not rgw_multisite | bool
|
||||||
|
block:
|
||||||
|
- name: reset rgw_instances (workaround)
|
||||||
|
set_fact:
|
||||||
|
rgw_instances: []
|
||||||
|
|
||||||
|
- name: set_fact rgw_instances without rgw multisite
|
||||||
|
set_fact:
|
||||||
|
rgw_instances: "{{ rgw_instances|default([]) | union([{'instance_name': 'rgw' + item|string, 'radosgw_address': hostvars[ceph_dashboard_call_item | default(inventory_hostname)]['_radosgw_address'], 'radosgw_frontend_port': radosgw_frontend_port|int + item|int }]) }}"
|
||||||
|
with_sequence: start=0 end={{ radosgw_num_instances|int - 1 }}
|
||||||
|
delegate_to: "{{ ceph_dashboard_call_item if ceph_dashboard_call_item is defined else inventory_hostname }}"
|
||||||
|
delegate_facts: "{{ true if ceph_dashboard_call_item is defined else false }}"
|
||||||
|
|
||||||
- name: set_fact is_rgw_instances_defined
|
- name: set_fact is_rgw_instances_defined
|
||||||
set_fact:
|
set_fact:
|
||||||
|
@ -81,17 +87,23 @@
|
||||||
- inventory_hostname in groups.get(rgw_group_name, [])
|
- inventory_hostname in groups.get(rgw_group_name, [])
|
||||||
- rgw_multisite | bool
|
- rgw_multisite | bool
|
||||||
|
|
||||||
- name: set_fact rgw_instances with rgw multisite
|
- name: rgw_instances with rgw multisite
|
||||||
set_fact:
|
|
||||||
rgw_instances: "{{ rgw_instances|default([]) | union([{ 'instance_name': 'rgw' + item | string, 'radosgw_address': hostvars[ceph_dashboard_call_item | default(inventory_hostname)]['_radosgw_address'], 'radosgw_frontend_port': radosgw_frontend_port | int + item|int, 'rgw_realm': rgw_realm | string, 'rgw_zonegroup': rgw_zonegroup | string, 'rgw_zone': rgw_zone | string, 'system_access_key': system_access_key, 'system_secret_key': system_secret_key, 'rgw_zone_user': rgw_zone_user, 'rgw_zone_user_display_name': rgw_zone_user_display_name, 'endpoint': (rgw_pull_proto + '://' + rgw_pullhost + ':' + rgw_pull_port | string) if not rgw_zonemaster | bool and rgw_zonesecondary | bool else omit }]) }}"
|
|
||||||
with_sequence: start=0 end={{ radosgw_num_instances|int - 1 }}
|
|
||||||
delegate_to: "{{ ceph_dashboard_call_item if ceph_dashboard_call_item is defined else inventory_hostname }}"
|
|
||||||
delegate_facts: "{{ true if ceph_dashboard_call_item is defined else false }}"
|
|
||||||
when:
|
when:
|
||||||
- ceph_dashboard_call_item is defined or
|
- ceph_dashboard_call_item is defined or
|
||||||
inventory_hostname in groups.get(rgw_group_name, [])
|
inventory_hostname in groups.get(rgw_group_name, [])
|
||||||
- rgw_multisite | bool
|
- rgw_multisite | bool
|
||||||
- not is_rgw_instances_defined | default(False) | bool
|
- not is_rgw_instances_defined | default(False) | bool
|
||||||
|
block:
|
||||||
|
- name: reset rgw_instances (workaround)
|
||||||
|
set_fact:
|
||||||
|
rgw_instances: []
|
||||||
|
|
||||||
|
- name: set_fact rgw_instances with rgw multisite
|
||||||
|
set_fact:
|
||||||
|
rgw_instances: "{{ rgw_instances|default([]) | union([{ 'instance_name': 'rgw' + item | string, 'radosgw_address': hostvars[ceph_dashboard_call_item | default(inventory_hostname)]['_radosgw_address'], 'radosgw_frontend_port': radosgw_frontend_port | int + item|int, 'rgw_realm': rgw_realm | string, 'rgw_zonegroup': rgw_zonegroup | string, 'rgw_zone': rgw_zone | string, 'system_access_key': system_access_key, 'system_secret_key': system_secret_key, 'rgw_zone_user': rgw_zone_user, 'rgw_zone_user_display_name': rgw_zone_user_display_name, 'endpoint': (rgw_pull_proto + '://' + rgw_pullhost + ':' + rgw_pull_port | string) if not rgw_zonemaster | bool and rgw_zonesecondary | bool else omit }]) }}"
|
||||||
|
with_sequence: start=0 end={{ radosgw_num_instances|int - 1 }}
|
||||||
|
delegate_to: "{{ ceph_dashboard_call_item if ceph_dashboard_call_item is defined else inventory_hostname }}"
|
||||||
|
delegate_facts: "{{ true if ceph_dashboard_call_item is defined else false }}"
|
||||||
|
|
||||||
- name: set_fact rgw_instances_host
|
- name: set_fact rgw_instances_host
|
||||||
set_fact:
|
set_fact:
|
||||||
|
|
Loading…
Reference in New Issue