From b753e7db15f26b1f13b7845c8c3b9764cacd563a Mon Sep 17 00:00:00 2001 From: Ali Maredia Date: Thu, 17 Sep 2020 00:19:45 -0400 Subject: [PATCH] rgw multisite: check connection for realm endpoint 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 (cherry picked from commit 902575369c73dfdb0e94d898bbabb9ebd5b12c93) --- roles/ceph-rgw/tasks/multisite/secondary.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/roles/ceph-rgw/tasks/multisite/secondary.yml b/roles/ceph-rgw/tasks/multisite/secondary.yml index 920418955..4537bc7a0 100644 --- a/roles/ceph-rgw/tasks/multisite/secondary.yml +++ b/roles/ceph-rgw/tasks/multisite/secondary.yml @@ -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] }}"