]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
shrink-mon: wait a little bit for the mon to be out 1851/head
authorSébastien Han <seb@redhat.com>
Mon, 4 Sep 2017 20:13:17 +0000 (22:13 +0200)
committerSébastien Han <seb@redhat.com>
Mon, 4 Sep 2017 21:08:57 +0000 (23:08 +0200)
Monitor removal from the monmap is not immediate, so let's wait a little
bit and then fail if the monitor is still in the monmap.
We try twice in total with 10 sec intervals.

Signed-off-by: Sébastien Han <seb@redhat.com>
infrastructure-playbooks/shrink-mon.yml

index 087a12ae676231d9d32a8d66d83b30a05ca56629..365f5b2b26c4ea5a8437d6c37af59ba51ac9f917 100644 (file)
       shell: |
         ceph --cluster {{ cluster }} -s -f json | python -c 'import sys, json; print(json.load(sys.stdin)["quorum_names"])'
       delegate_to: "{{ mon_host }}"
+      failed_when: false
       register: result
+      until: mon_to_kill_hostname not in result.stdout
+      retries: 2
+      delay: 10
 
     - name: please remove the monitor from your ceph configuration file
       debug: