]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
cephadm-adopt: wait for monitor in quorum
authorDimitri Savineau <dsavinea@redhat.com>
Fri, 10 Jul 2020 21:41:32 +0000 (17:41 -0400)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Mon, 13 Jul 2020 14:17:56 +0000 (10:17 -0400)
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>
(cherry picked from commit 0c3a2b72ff1efe7c5a1592b12bd2d6690b6096a7)

infrastructure-playbooks/cephadm-adopt.yml

index 42ce8ddc7806dfc1e38506b6d3c2a3c55a337e1b..f5a2ed94d8177148c2db48b83ba17a929a83c963 100644 (file)
         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