mirror of https://github.com/ceph/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 <gabrioux@redhat.com>pull/3748/head
parent
32569b79e2
commit
f7c6f4e0b6
|
@ -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 }}"
|
||||
|
|
Loading…
Reference in New Issue