]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
switch2container: fix mon quorum check
authorGuillaume Abrioux <gabrioux@redhat.com>
Fri, 18 Dec 2020 09:33:44 +0000 (10:33 +0100)
committerGuillaume Abrioux <gabrioux@redhat.com>
Thu, 11 Mar 2021 12:50:27 +0000 (13:50 +0100)
The current check makes no sense because it checks any of other monitor
than the one being played (either a previous one already converted or a
next that isn't yet converted) is present on the quorum.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1909011
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 175ffa1b882960e8127ada7f6a4b1e6c9a9b8fba)

infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml

index 46b2b24dac192da8e78dc19e209d9d40c88923a3..d5ba37e7aabdf6b66622ffa3918f5ff434a90490 100644 (file)
 
   post_tasks:
     - name: waiting for the monitor to join the quorum...
-      command: "{{ container_exec_cmd }} ceph --cluster {{ cluster }} quorum_status --format json"
+      command: "{{ container_binary }} run --rm  -v /etc/ceph:/etc/ceph:z --entrypoint=ceph {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} --cluster {{ cluster }} quorum_status --format json"
       register: ceph_health_raw
+      until: ansible_hostname in (ceph_health_raw.stdout | trim | from_json)["quorum_names"]
       changed_when: false
-      until: >
-        hostvars[mon_host]['ansible_hostname'] in (ceph_health_raw.stdout | from_json)["quorum_names"]
       retries: "{{ health_mon_check_retries }}"
       delay: "{{ health_mon_check_delay }}"