]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test: timeout verification that mon is unreachable 11089/head
authorLoic Dachary <ldachary@redhat.com>
Fri, 16 Sep 2016 08:56:51 +0000 (10:56 +0200)
committerLoic Dachary <ldachary@redhat.com>
Fri, 16 Sep 2016 12:20:38 +0000 (14:20 +0200)
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 <loic@dachary.org>
qa/workunits/ceph-helpers.sh

index 3e854792d3d2e0206f36c2f11bf53dd8ad7469e0..fb1c48693b3099f76cfbd73455930761a4c32e78 100755 (executable)
@@ -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
 }