mirror of https://github.com/ceph/ceph-ansible.git
ceph-common: do not get current fsid when performing a rolling_update
This avoids a situation where during a rolling_update we try to talk to a mon to get the fsid and if that mon is down the playbook hangs indefinitely. Signed-off-by: Andrew Schoen <aschoen@redhat.com>pull/1315/head
parent
920bd9cf2d
commit
1579642e3f
|
@ -401,3 +401,7 @@ mon_containerized_default_ceph_conf_with_kv: false
|
||||||
nfs_file_gw: true
|
nfs_file_gw: true
|
||||||
# Set this to true to enable Object access via NFS. Requires an RGW role.
|
# Set this to true to enable Object access via NFS. Requires an RGW role.
|
||||||
nfs_obj_gw: false
|
nfs_obj_gw: false
|
||||||
|
|
||||||
|
# this is only here for usage with the rolling_update.yml playbook
|
||||||
|
# do not ever change this here
|
||||||
|
rolling_update: false
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
always_run: yes
|
always_run: yes
|
||||||
register: ceph_version
|
register: ceph_version
|
||||||
|
|
||||||
|
# this task shouldn't run in a rolling_update situation
|
||||||
|
# because it blindly picks a mon, which may be down because
|
||||||
|
# of the rolling update
|
||||||
- name: is ceph running already?
|
- name: is ceph running already?
|
||||||
command: ceph --connect-timeout 3 --cluster {{ cluster }} fsid
|
command: ceph --connect-timeout 3 --cluster {{ cluster }} fsid
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
@ -12,6 +15,14 @@
|
||||||
always_run: yes
|
always_run: yes
|
||||||
register: ceph_current_fsid
|
register: ceph_current_fsid
|
||||||
delegate_to: "{{ groups[mon_group_name][0] }}"
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||||
|
when: not rolling_update
|
||||||
|
|
||||||
|
# set this as a default when performing a rolling_update
|
||||||
|
# so the rest of the tasks here will succeed
|
||||||
|
- set_fact:
|
||||||
|
ceph_current_fsid:
|
||||||
|
rc: 1
|
||||||
|
when: rolling_update
|
||||||
|
|
||||||
- name: create a local fetch directory if it does not exist
|
- name: create a local fetch directory if it does not exist
|
||||||
local_action: file path={{ fetch_directory }} state=directory
|
local_action: file path={{ fetch_directory }} state=directory
|
||||||
|
@ -22,7 +33,8 @@
|
||||||
|
|
||||||
- set_fact:
|
- set_fact:
|
||||||
fsid: "{{ ceph_current_fsid.stdout }}"
|
fsid: "{{ ceph_current_fsid.stdout }}"
|
||||||
when: ceph_current_fsid.rc == 0
|
when:
|
||||||
|
- ceph_current_fsid.rc == 0
|
||||||
|
|
||||||
- set_fact:
|
- set_fact:
|
||||||
monitor_name: "{{ ansible_hostname }}"
|
monitor_name: "{{ ansible_hostname }}"
|
||||||
|
|
Loading…
Reference in New Issue