From 154c5aa4b5c0208d108fbb3c791691b6ac6ea30f Mon Sep 17 00:00:00 2001 From: Yin Jifeng Date: Fri, 17 Apr 2015 10:04:52 +0800 Subject: [PATCH] make sure a running mon to check when upgrade mon --- rolling_update.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rolling_update.yml b/rolling_update.yml index 741ca091e..0022bde03 100644 --- a/rolling_update.yml +++ b/rolling_update.yml @@ -56,6 +56,11 @@ state=restarted args=mon + - name: select a running monitor + set_fact: mon_host={{ item }} + with_items: groups.mons + when: item != inventory_hostname + - name: Waiting for the monitor to join the quorum... shell: > ceph -s | grep monmap | sed 's/.*quorum//' | egrep -sq {{ ansible_hostname }} @@ -63,7 +68,7 @@ until: result.rc == 0 retries: 5 delay: 10 - delegate_to: "{{ groups.mons[0] }}" + delegate_to: "{{ mon_host }}" - hosts: osds -- 2.39.5