Skip to content

Commit

Permalink
multisite: fix bug during switch2containers
Browse files Browse the repository at this point in the history
When running the switch-to-containers playbook with multisite enabled,
the fact "rgw_instances" is only set for the node being processed
(serial: 1), the consequence of that is that the set_fact of
'rgw_instances_all' can't iterate over all rgw node in order to look up
each 'rgw_instances_host'.

Adding a condition checking whether hostvars[item]["rgw_instances_host"]
is defined fixes this issue.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1967926

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 8279d14)
  • Loading branch information
guits committed Jun 17, 2021
1 parent 69cc3b8 commit cb4dbd6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions roles/ceph-facts/tasks/set_radosgw_address.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,5 @@
with_items: "{{ groups.get(rgw_group_name, []) }}"
when:
- inventory_hostname in groups.get(rgw_group_name, [])
- hostvars[item]["rgw_instances_host"] is defined
- hostvars[item]["rgw_multisite"] | default(False) | bool

0 comments on commit cb4dbd6

Please sign in to comment.