From: Dimitri Savineau Date: Fri, 10 Jul 2020 21:41:32 +0000 (-0400) Subject: cephadm-adopt: wait for monitor in quorum X-Git-Tag: v6.0.0alpha2~122 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0c3a2b72ff1efe7c5a1592b12bd2d6690b6096a7;p=ceph-ansible.git 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 --- diff --git a/infrastructure-playbooks/cephadm-adopt.yml b/infrastructure-playbooks/cephadm-adopt.yml index 42ce8ddc7..f5a2ed94d 100644 --- a/infrastructure-playbooks/cephadm-adopt.yml +++ b/infrastructure-playbooks/cephadm-adopt.yml @@ -346,6 +346,17 @@ state: absent 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 hosts: "{{ mgr_group_name|default('mgrs') }}" serial: 1