facts: retrieve fsid during rolling_update playbook

otherwise it generates a new cluster fsid and makes the upgrade failing

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
pull/3748/head
Guillaume Abrioux 2019-03-20 18:34:47 +01:00 committed by Dimitri Savineau
parent 5c3ce4ca77
commit 7386249c71
1 changed files with 14 additions and 0 deletions

View File

@ -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: