Merge pull request #66 from ceph/wip-specific-exceptions

Catch CommandFailedError and print debug info
This commit is contained in:
Alfredo Deza 2013-09-03 13:24:45 -07:00
commit 21b5dbd4e4

View File

@ -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)