mirror of https://github.com/ceph/ceph-ansible.git
make sure a running mon to check when upgrade mon
parent
95ca89695c
commit
154c5aa4b5
|
@ -56,6 +56,11 @@
|
||||||
state=restarted
|
state=restarted
|
||||||
args=mon
|
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...
|
- name: Waiting for the monitor to join the quorum...
|
||||||
shell: >
|
shell: >
|
||||||
ceph -s | grep monmap | sed 's/.*quorum//' | egrep -sq {{ ansible_hostname }}
|
ceph -s | grep monmap | sed 's/.*quorum//' | egrep -sq {{ ansible_hostname }}
|
||||||
|
@ -63,7 +68,7 @@
|
||||||
until: result.rc == 0
|
until: result.rc == 0
|
||||||
retries: 5
|
retries: 5
|
||||||
delay: 10
|
delay: 10
|
||||||
delegate_to: "{{ groups.mons[0] }}"
|
delegate_to: "{{ mon_host }}"
|
||||||
|
|
||||||
|
|
||||||
- hosts: osds
|
- hosts: osds
|
||||||
|
|
Loading…
Reference in New Issue