From: Guillaume Abrioux Date: Wed, 20 Mar 2019 17:34:47 +0000 (+0100) Subject: facts: retrieve fsid during rolling_update playbook X-Git-Tag: v4.0.0rc1~15 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=7386249c712cfb36b2f6face13dd9770d9863452;p=ceph-ansible.git facts: retrieve fsid during rolling_update playbook otherwise it generates a new cluster fsid and makes the upgrade failing Signed-off-by: Guillaume Abrioux --- diff --git a/roles/ceph-facts/tasks/facts.yml b/roles/ceph-facts/tasks/facts.yml index bbb041a86..58ee121a9 100644 --- a/roles/ceph-facts/tasks/facts.yml +++ b/roles/ceph-facts/tasks/facts.yml @@ -81,6 +81,19 @@ when: - (cephx or generate_fsid) +- name: get current fsid + command: "{{ timeout_command }} {{ docker_exec_cmd }} ceph --cluster {{ cluster }} daemon mon.{{ hostvars[mon_host | default(groups[mon_group_name][0])]['ansible_hostname'] }} config get fsid" + register: rolling_update_fsid + delegate_to: "{{ mon_host | default(groups[mon_group_name][0]) }}" + when: + - rolling_update + +- name: set_fact fsid + set_fact: + fsid: "{{ (rolling_update_fsid.stdout | from_json).fsid }}" + when: + - rolling_update + - name: set_fact ceph_current_status (convert to json) set_fact: ceph_current_status: "{{ ceph_current_status.stdout | from_json }}" @@ -109,6 +122,7 @@ when: - generate_fsid - ceph_current_status.fsid is undefined + - not rolling_update - name: set_fact mds_name ansible_hostname set_fact: