]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
rgw multisite: check connection for realm endpoint
authorAli Maredia <amaredia@redhat.com>
Thu, 17 Sep 2020 04:19:45 +0000 (00:19 -0400)
committerGuillaume Abrioux <gabrioux@redhat.com>
Tue, 29 Sep 2020 05:37:21 +0000 (07:37 +0200)
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>
roles/ceph-rgw/tasks/multisite/secondary.yml

index 920418955057cb39d1e8e4a9c2d9052fa59f0a1d..4537bc7a0b1c6b5ad7a21144ecb3fdee2973c80d 100644 (file)
@@ -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] }}"