From: Guillaume Abrioux Date: Wed, 20 Mar 2019 08:31:12 +0000 (+0100) Subject: update: fix tasks waiting for the node to join the quorum X-Git-Tag: v4.0.0rc1~24 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=f7c6f4e0b67a7ea9e470f563d1b05a64a2cb45ce;p=ceph-ansible.git update: fix tasks waiting for the node to join the quorum We actually want to ensure the node being upgraded is joining the quorum instead of the monitor picked up earlier. Indeed, the `mon_host`is used only in `delegate_to:` so we can still run ceph commands while the monitor being upgraded is stopped. Signed-off-by: Guillaume Abrioux --- diff --git a/infrastructure-playbooks/rolling_update.yml b/infrastructure-playbooks/rolling_update.yml index 1a1ed249a..75861b348 100644 --- a/infrastructure-playbooks/rolling_update.yml +++ b/infrastructure-playbooks/rolling_update.yml @@ -185,8 +185,8 @@ command: ceph --cluster "{{ cluster }}" -s --format json register: ceph_health_raw until: > - hostvars[mon_host]['ansible_hostname'] in (ceph_health_raw.stdout | default('{}') | from_json)["quorum_names"] or - hostvars[mon_host]['ansible_fqdn'] in (ceph_health_raw.stdout | default('{}') | from_json)["quorum_names"] + 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 }}" @@ -195,11 +195,11 @@ - name: container | waiting for the containerized monitor to join the quorum... command: > - {{ container_binary }} exec ceph-mon-{{ hostvars[mon_host]['ansible_hostname'] }} ceph --cluster "{{ cluster }}" -s --format json + {{ container_binary }} exec ceph-mon-{{ hostvars[inventory_hostname]['ansible_hostname'] }} ceph --cluster "{{ cluster }}" -s --format json register: ceph_health_raw until: > - hostvars[mon_host]['ansible_hostname'] in (ceph_health_raw.stdout | default('{}') | from_json)["quorum_names"] or - hostvars[mon_host]['ansible_fqdn'] in (ceph_health_raw.stdout | default('{}') | from_json)["quorum_names"] + 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 }}"