From f744c4ce53618b7e590f3fbac18ad324ec733b31 Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Tue, 3 Sep 2013 14:40:31 -0500 Subject: [PATCH] Catch CommandFailedError and print debug info --- teuthology/misc.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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) -- 2.47.3