mirror of
https://github.com/ceph/ceph
synced 2025-01-12 06:00:46 +00:00
Merge pull request #66 from ceph/wip-specific-exceptions
Catch CommandFailedError and print debug info
This commit is contained in:
commit
21b5dbd4e4
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user