From: Zack Cerza Date: Tue, 3 Sep 2013 19:40:31 +0000 (-0500) Subject: Catch CommandFailedError and print debug info X-Git-Tag: 1.1.0~1909^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F66%2Fhead;p=teuthology.git Catch CommandFailedError and print debug info --- diff --git a/teuthology/misc.py b/teuthology/misc.py index 7be8fb271..bf9497b61 100644 --- a/teuthology/misc.py +++ b/teuthology/misc.py @@ -631,6 +631,7 @@ def get_scratch_devices(remote): retval = [] for dev in devs: try: + # FIXME: Split this into multiple calls. remote.run( args=[ # node exists @@ -645,14 +646,14 @@ def get_scratch_devices(remote): 'mount', run.Raw('|'), 'grep', '-q', dev, - ] - ) + ] + ) retval.append(dev) - except Exception: - log.exception("Saw exception") - pass + except run.CommandFailedError: + log.debug("get_scratch_devices: %s is in use" % dev) return retval + def wait_until_healthy(ctx, remote): """Wait until a Ceph cluster is healthy.""" testdir = get_testdir(ctx)