From: Loic Dachary Date: Fri, 16 Sep 2016 08:56:51 +0000 (+0200) Subject: test: timeout verification that mon is unreachable X-Git-Tag: v11.0.1~124^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a5e5119bd138a97f35737c2b50d1e621fa8286d6;p=ceph.git 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 --- 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 }