From 579b95fd8a7d5cadd29de65f16615ffe420d51c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Mon, 4 Sep 2017 22:13:17 +0200 Subject: [PATCH] shrink-mon: wait a little bit for the mon to be out MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- infrastructure-playbooks/shrink-mon.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/infrastructure-playbooks/shrink-mon.yml b/infrastructure-playbooks/shrink-mon.yml index 087a12ae6..365f5b2b2 100644 --- a/infrastructure-playbooks/shrink-mon.yml +++ b/infrastructure-playbooks/shrink-mon.yml @@ -118,7 +118,11 @@ 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: