Skip to content

Commit

Permalink
rgw multisite: check connection for realm endpoint
Browse files Browse the repository at this point in the history
This commit adds connection checks before realm pulls
Curls are performed on the endpoint being pulled from
the mons and the rgws

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

Signed-off-by: Ali Maredia <amaredia@redhat.com>
(cherry picked from commit 9025753)
  • Loading branch information
alimaredia authored and dsavineau committed Sep 29, 2020
1 parent e3284b2 commit 9f58d4a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions roles/ceph-rgw/tasks/multisite/secondary.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
---
- name: ensure connection to primary cluster from mon
uri:
url: "{{ item.endpoint }}"
delegate_to: "{{ groups[mon_group_name][0] }}"
run_once: true
loop: "{{ secondary_realms }}"
when: secondary_realms is defined

- name: ensure connection to primary cluster from rgw
uri:
url: "{{ item.endpoint }}"
loop: "{{ rgw_instances }}"

- name: fetch the realm(s)
command: "{{ container_exec_cmd }} radosgw-admin realm pull --cluster={{ cluster }} --rgw-realm={{ item.realm }} --url={{ item.endpoint }} --access-key={{ item.system_access_key }} --secret={{ item.system_secret_key }}"
delegate_to: "{{ groups[mon_group_name][0] }}"
Expand Down

0 comments on commit 9f58d4a

Please sign in to comment.