From: Guillaume Abrioux Date: Wed, 24 Jan 2018 17:49:41 +0000 (+0100) Subject: defaults: avoid getting stuck (ceph --connect-timeout) X-Git-Tag: v3.0.20~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f2259df2689e35aa6bc7c8012d8f13964c305c51;p=ceph-ansible.git defaults: avoid getting stuck (ceph --connect-timeout) Sometime the playbook gets stuck because even with `--connect-timeout=` option, the connexion to the existing ceph cluster never timeout. As a workaround, using `timeout` command provided by coreutils will actually timeout if we can't connect to the cluster. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1537003 Signed-off-by: Guillaume Abrioux (cherry picked from commit ec16cbdb1af9069de09d4a2e2e88739c2c303350) --- diff --git a/roles/ceph-defaults/tasks/facts.yml b/roles/ceph-defaults/tasks/facts.yml index 7b5edfa21..4799e90a5 100644 --- a/roles/ceph-defaults/tasks/facts.yml +++ b/roles/ceph-defaults/tasks/facts.yml @@ -22,7 +22,7 @@ # because it blindly picks a mon, which may be down because # of the rolling update - name: is ceph running already? - command: "{{ docker_exec_cmd }} ceph --connect-timeout 3 --cluster {{ cluster }} fsid" + command: "timeout 5 {{ docker_exec_cmd }} ceph --cluster {{ cluster }} fsid" changed_when: false failed_when: false always_run: yes