mirror of https://github.com/ceph/ceph-ansible.git
update: ensure ceph command returns 0
these commands could return something else than 0. Let's ensure all retries have been done before actually failing. Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>pull/3882/head
parent
543d1e2e41
commit
ed84325b1d
|
@ -238,9 +238,10 @@
|
|||
- name: non container | waiting for the monitor to join the quorum...
|
||||
command: ceph --cluster "{{ cluster }}" -s --format json
|
||||
register: ceph_health_raw
|
||||
until: >
|
||||
hostvars[inventory_hostname]['ansible_hostname'] in (ceph_health_raw.stdout | default('{}') | from_json)["quorum_names"] or
|
||||
hostvars[inventory_hostname]['ansible_fqdn'] in (ceph_health_raw.stdout | default('{}') | from_json)["quorum_names"]
|
||||
until:
|
||||
- ceph_health_raw.rc == 0
|
||||
- (hostvars[inventory_hostname]['ansible_hostname'] in (ceph_health_raw.stdout | default('{}') | from_json)["quorum_names"] or
|
||||
hostvars[inventory_hostname]['ansible_fqdn'] in (ceph_health_raw.stdout | default('{}') | from_json)["quorum_names"])
|
||||
retries: "{{ health_mon_check_retries }}"
|
||||
delay: "{{ health_mon_check_delay }}"
|
||||
delegate_to: "{{ mon_host }}"
|
||||
|
@ -252,8 +253,9 @@
|
|||
{{ container_binary }} exec ceph-mon-{{ hostvars[mon_host]['ansible_hostname'] }} ceph --cluster "{{ cluster }}" -s --format json
|
||||
register: ceph_health_raw
|
||||
until: >
|
||||
hostvars[inventory_hostname]['ansible_hostname'] in (ceph_health_raw.stdout | default('{}') | from_json)["quorum_names"] or
|
||||
hostvars[inventory_hostname]['ansible_fqdn'] in (ceph_health_raw.stdout | default('{}') | from_json)["quorum_names"]
|
||||
- ceph_health_raw.rc == 0
|
||||
- (hostvars[inventory_hostname]['ansible_hostname'] in (ceph_health_raw.stdout | default('{}') | from_json)["quorum_names"] or
|
||||
hostvars[inventory_hostname]['ansible_fqdn'] in (ceph_health_raw.stdout | default('{}') | from_json)["quorum_names"])
|
||||
retries: "{{ health_mon_check_retries }}"
|
||||
delay: "{{ health_mon_check_delay }}"
|
||||
delegate_to: "{{ mon_host }}"
|
||||
|
|
Loading…
Reference in New Issue