mirror of
https://github.com/ceph/ceph
synced 2025-03-25 11:48:05 +00:00
ceph: copy cluster log file to archive/ceph.log
This commit is contained in:
parent
e79dda9a9d
commit
21d04419b8
@ -509,6 +509,19 @@ def cluster(ctx, config):
|
||||
try:
|
||||
yield
|
||||
finally:
|
||||
if ctx.archive is not None:
|
||||
(remote,) = ctx.cluster.only(firstmon).remotes.iterkeys()
|
||||
log.info('Grabbing cluster log from %s %s...' % (remote, firstmon))
|
||||
dest = os.path.join(ctx.archive, 'ceph.log')
|
||||
proc = remote.run(
|
||||
args = [
|
||||
'cat',
|
||||
'--',
|
||||
'/tmp/cephtest/data/%s/log' % firstmon
|
||||
],
|
||||
stdout=file(dest, 'wb'),
|
||||
)
|
||||
|
||||
log.info('Cleaning ceph cluster...')
|
||||
run.wait(
|
||||
ctx.cluster.run(
|
||||
|
Loading…
Reference in New Issue
Block a user