mirror of https://github.com/ceph/ceph-ansible.git
switch: nicer way to check mon quorum
re-use the same syntax as rolling_udate.yml Signed-off-by: Sébastien Han <seb@redhat.com>pull/2055/head
parent
7ee9aa94b5
commit
39bf102b64
|
@ -126,16 +126,15 @@
|
||||||
post_tasks:
|
post_tasks:
|
||||||
# We don't do a container test by running 'docker exec ...' since not all the monitors have switched to containers yet.
|
# We don't do a container test by running 'docker exec ...' since not all the monitors have switched to containers yet.
|
||||||
# Thus, we continue to use the 'ceph' binary from the host, there is no issue with that.
|
# Thus, we continue to use the 'ceph' binary from the host, there is no issue with that.
|
||||||
- name: waiting for the containerized monitor to join the quorum...
|
- name: non container | waiting for the monitor to join the quorum...
|
||||||
shell: |
|
command: ceph --cluster "{{ cluster }}" -s --format json
|
||||||
ceph --cluster {{ cluster }} -s -f json | python -c 'import sys, json; print(json.load(sys.stdin)["quorum_names"])'
|
register: ceph_health_raw
|
||||||
register: result
|
until: >
|
||||||
until: "{{ ansible_hostname in result.stdout }}"
|
hostvars[mon_host]['ansible_hostname'] in (ceph_health_raw.stdout | from_json)["quorum_names"]
|
||||||
retries: "{{ health_mon_check_retries }}"
|
retries: "{{ health_mon_check_retries }}"
|
||||||
delay: "{{ health_mon_check_delay }}"
|
delay: "{{ health_mon_check_delay }}"
|
||||||
delegate_to: "{{ mon_host }}"
|
delegate_to: "{{ mon_host }}"
|
||||||
|
|
||||||
|
|
||||||
- name: switching from non-containerized to containerized ceph mgr
|
- name: switching from non-containerized to containerized ceph mgr
|
||||||
|
|
||||||
hosts:
|
hosts:
|
||||||
|
|
Loading…
Reference in New Issue