cephadm-adopt: wait for monitor in quorum

After adopting a monitor we need to wait that monitor to join back
the quorum before moving to the next node.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
pull/5552/head
Dimitri Savineau 2020-07-10 17:41:32 -04:00 committed by Dimitri Savineau
parent d3b3c8948e
commit 0c3a2b72ff
1 changed files with 11 additions and 0 deletions

View File

@ -346,6 +346,17 @@
state: absent state: absent
when: not containerized_deployment | bool when: not containerized_deployment | bool
- name: waiting for the monitor to join the quorum...
command: "cephadm shell --fsid {{ fsid }} -- ceph --cluster {{ cluster }} -s --format json"
changed_when: false
register: ceph_health_raw
until: >
ansible_hostname in (ceph_health_raw.stdout | from_json)["quorum_names"]
retries: "{{ health_mon_check_retries }}"
delay: "{{ health_mon_check_delay }}"
environment:
CEPHADM_IMAGE: '{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}'
- name: adopt ceph mgr daemons - name: adopt ceph mgr daemons
hosts: "{{ mgr_group_name|default('mgrs') }}" hosts: "{{ mgr_group_name|default('mgrs') }}"
serial: 1 serial: 1