From: Sage Weil Date: Tue, 23 Aug 2011 05:04:57 +0000 (-0700) Subject: ceph: copy cluster log file to archive/ceph.log X-Git-Tag: 1.1.0~2846 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=21d04419b81729f708f41425be3d1ab6537bcfda;p=teuthology.git ceph: copy cluster log file to archive/ceph.log --- diff --git a/teuthology/task/ceph.py b/teuthology/task/ceph.py index 5c41b30036..91f5167687 100644 --- a/teuthology/task/ceph.py +++ b/teuthology/task/ceph.py @@ -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(