From 828f88403e950647befdcb2f83d48e04303de0d1 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Tue, 11 Jul 2017 15:36:01 +0200 Subject: [PATCH] Update: Avoid screen scraping in rolling update since luminous has revamped the `ceph -s` output, we need to avoid screen scraping. Signed-off-by: Guillaume Abrioux --- infrastructure-playbooks/rolling_update.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/infrastructure-playbooks/rolling_update.yml b/infrastructure-playbooks/rolling_update.yml index 30acaba88..79a32317f 100644 --- a/infrastructure-playbooks/rolling_update.yml +++ b/infrastructure-playbooks/rolling_update.yml @@ -143,9 +143,9 @@ - name: waiting for the monitor to join the quorum... shell: | - ceph -s --cluster {{ cluster }} | grep election | sed 's/.*quorum//' | egrep -sq {{ ansible_hostname }} + ceph --cluster {{ cluster }} -s -f json | python -c 'import sys, json; print(json.load(sys.stdin)["quorum_names"])' register: result - until: result.rc == 0 + until: "{{ ansible_hostname in result.stdout }}" retries: "{{ health_mon_check_retries }}" delay: "{{ health_mon_check_delay }}" delegate_to: "{{ mon_host }}" @@ -153,9 +153,9 @@ - name: waiting for the containerized monitor to join the quorum... shell: | - docker exec ceph-mon-{{ hostvars[mon_host]['ansible_hostname'] }} ceph -s --cluster {{ cluster }} | grep quorum | sed 's/.*quorum//' | egrep -sq {{ ansible_hostname }} + docker exec ceph-mon-{{ hostvars[mon_host]['ansible_hostname'] }} ceph --cluster {{ cluster }} -s -f json | python -c 'import sys, json; print(json.load(sys.stdin)["quorum_names"])' register: result - until: result.rc == 0 + until: "{{ ansible_hostname in result.stdout }}" retries: "{{ health_mon_check_retries }}" delay: "{{ health_mon_check_delay }}" delegate_to: "{{ mon_host }}" -- 2.39.5