]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test: Limit how long ceph-objectstore-tool test will wait for health
authorDavid Zafman <dzafman@redhat.com>
Tue, 31 Mar 2015 00:35:07 +0000 (17:35 -0700)
committerDavid Zafman <dzafman@redhat.com>
Wed, 13 May 2015 20:09:13 +0000 (13:09 -0700)
Signed-off-by: David Zafman <dzafman@redhat.com>
src/test/ceph_objectstore_tool.py

index 504c97d61fc65e1cd4fa4e45baf0113fea9f5259..800993bbef488d8770946ce9811820711dfb8814 100755 (executable)
@@ -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"