]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
rgw: add retry/until on pools tasks
authorGuillaume Abrioux <gabrioux@redhat.com>
Fri, 6 Mar 2020 07:06:37 +0000 (08:06 +0100)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Fri, 6 Mar 2020 13:55:13 +0000 (08:55 -0500)
Sometimes, these task can timeout for some reason.
Adding these retries can help to avoid unexcepted failures.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
roles/ceph-rgw/tasks/rgw_create_pools.yml

index 12d8732632b1dc20f65a34d2531cde2dca05eadc..2d6333eddb43db4246fa43a279fd1271c87cc7b9 100644 (file)
 - name: create replicated pools for rgw
   command: "{{ container_exec_cmd }} ceph --connect-timeout 10 --cluster {{ cluster }} osd pool create {{ item.key }} {{ item.value.pg_num | default(osd_pool_default_pg_num) }} replicated"
   changed_when: false
+  register: result
+  retries: 60
+  delay: 3
+  until: result is succeeded
   with_dict: "{{ rgw_create_pools }}"
   delegate_to: "{{ groups[mon_group_name][0] }}"
   when: item.value.type is not defined or item.value.type == 'replicated'
 
 - name: customize replicated pool size
   command: "{{ container_exec_cmd }} ceph --connect-timeout 10 --cluster {{ cluster }} osd pool set {{ item.key }} size {{ item.value.size | default(osd_pool_default_size) }}"
+  register: result
+  retries: 60
+  delay: 3
+  until: result is succeeded
   with_dict: "{{ rgw_create_pools }}"
   delegate_to: "{{ groups[mon_group_name][0] }}"
   changed_when: false
 
 - name: set the rgw_create_pools pools application to rgw
   command: "{{ container_exec_cmd }} ceph --connect-timeout 10 --cluster {{ cluster }} osd pool application enable {{ item.key }} rgw"
+  register: result
+  retries: 60
+  delay: 3
+  until: result is succeeded
   changed_when: false
   with_dict: "{{ rgw_create_pools }}"
   delegate_to: "{{ groups[mon_group_name][0] }}"