]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
defaults: avoid getting stuck (ceph --connect-timeout)
authorGuillaume Abrioux <gabrioux@redhat.com>
Wed, 24 Jan 2018 17:49:41 +0000 (18:49 +0100)
committerGuillaume Abrioux <gabrioux@redhat.com>
Thu, 25 Jan 2018 09:19:27 +0000 (10:19 +0100)
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 <gabrioux@redhat.com>
(cherry picked from commit ec16cbdb1af9069de09d4a2e2e88739c2c303350)

roles/ceph-defaults/tasks/facts.yml

index 7b5edfa21fcd2066bc4e0ce2835f3449b306756c..4799e90a5b35938263acde436db3e09778b27454 100644 (file)
@@ -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