From 7523ff3e58eecbd373d0e1ccb02c7f8e54f0f18b Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 6 Jun 2012 13:32:56 -0700 Subject: [PATCH] ceph: simplify 'cluster' mon log handling It's not a special file in the mon_data directory anymore, but intead something in archive that will get slurped up normally. Make sure we grep for badness from the proper location. --- teuthology/ceph.conf | 1 + teuthology/task/ceph.py | 16 ++-------------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/teuthology/ceph.conf b/teuthology/ceph.conf index e8e730f469989..480c889f83a9b 100644 --- a/teuthology/ceph.conf +++ b/teuthology/ceph.conf @@ -10,6 +10,7 @@ [mon] mon data = /tmp/cephtest/data/mon.$id + mon cluster log file = /tmp/cephtest/archive/log/cluster.mon.$id.log [osd] osd data = /tmp/cephtest/data/osd.$id.data diff --git a/teuthology/task/ceph.py b/teuthology/task/ceph.py index eb4119ed4b8ca..96a1d87730618 100644 --- a/teuthology/task/ceph.py +++ b/teuthology/task/ceph.py @@ -689,24 +689,12 @@ def cluster(ctx, config): yield finally: (mon0_remote,) = ctx.cluster.only(firstmon).remotes.keys() - if ctx.archive is not None: - log.info('Grabbing cluster log from %s %s...' % (mon0_remote, - firstmon)) - dest = os.path.join(ctx.archive, 'ceph.log') - mon0_remote.run( - args = [ - 'cat', - '--', - '/tmp/cephtest/data/%s/log' % firstmon - ], - stdout=file(dest, 'wb'), - ) - log.info('Checking cluster ceph.log for badness...') + log.info('Checking cluster log for badness...') def first_in_ceph_log(pattern, excludes): args = [ 'egrep', pattern, - '/tmp/cephtest/data/%s/log' % firstmon, + '/tmp/cephtest/archive/log/cluster.%s.log' % firstmon, ] for exclude in excludes: args.extend([run.Raw('|'), 'egrep', '-v', exclude]) -- 2.39.5