From: David Zafman Date: Tue, 31 Mar 2015 00:35:07 +0000 (-0700) Subject: test: Limit how long ceph-objectstore-tool test will wait for health X-Git-Tag: v0.94.7~28^2~11^2~11 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b337d677daf5b6098a2dbcf2d8966703cf8db449;p=ceph.git test: Limit how long ceph-objectstore-tool test will wait for health Signed-off-by: David Zafman (cherry picked from commit 868cf457a3990ba9989aef55823630e3189acf4a) --- diff --git a/src/test/ceph_objectstore_tool.py b/src/test/ceph_objectstore_tool.py index 504c97d61fc6..800993bbef48 100755 --- a/src/test/ceph_objectstore_tool.py +++ b/src/test/ceph_objectstore_tool.py @@ -34,7 +34,10 @@ logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.WARNING) def wait_for_health(): print "Wait for health_ok...", + tries = 0 while call("./ceph health 2> /dev/null | grep -v 'HEALTH_OK\|HEALTH_WARN' > /dev/null", shell=True) == 0: + if ++tries == 30: + raise Exception("Time exceeded to go to health") time.sleep(5) print "DONE"