]> git-server-git.apps.pok.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:15:59 +0000 (10:15 +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>
roles/ceph-defaults/tasks/facts.yml

index 5ab8acb3336bdc07eef0445a12173bafe918e60e..040c88c7aaa9814d244ce364717fae95da9356d3 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
   check_mode: no