From a5e5119bd138a97f35737c2b50d1e621fa8286d6 Mon Sep 17 00:00:00 2001 From: Loic Dachary Date: Fri, 16 Sep 2016 10:56:51 +0200 Subject: [PATCH] test: timeout verification that mon is unreachable Without a timeout on the command, it may hang for a very long time, hunting for new mons. If it hangs for more than 60 seconds, it is safe to assume the mon is indeed down. Fixes: http://tracker.ceph.com/issues/16477 Signed-off-by: Loic Dachary --- qa/workunits/ceph-helpers.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qa/workunits/ceph-helpers.sh b/qa/workunits/ceph-helpers.sh index 3e854792d3d2..fb1c48693b30 100755 --- a/qa/workunits/ceph-helpers.sh +++ b/qa/workunits/ceph-helpers.sh @@ -214,7 +214,7 @@ function test_kill_daemon() { # kill the mon and verify it cannot be reached # kill_daemon $pidfile TERM || return 1 - ! ceph --connect-timeout 60 status || return 1 + ! timeout 60 ceph --connect-timeout 60 status || return 1 done teardown $dir || return 1 @@ -290,7 +290,7 @@ function test_kill_daemons() { # kill the mon and verify it cannot be reached # kill_daemons $dir TERM || return 1 - ! ceph --connect-timeout 60 status || return 1 + ! timeout 60 ceph --connect-timeout 60 status || return 1 teardown $dir || return 1 } -- 2.47.3