]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph: simplify 'cluster' mon log handling
authorSage Weil <sage@newdream.net>
Wed, 6 Jun 2012 20:32:56 +0000 (13:32 -0700)
committerSage Weil <sage@newdream.net>
Wed, 6 Jun 2012 20:32:56 +0000 (13:32 -0700)
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
teuthology/task/ceph.py

index e8e730f46998967e8afc0e82de4cdb64dfaeccb1..480c889f83a9b603101d15f3d9fb0ab43e4e742f 100644 (file)
@@ -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
index eb4119ed4b8ca0d53145949af1592d102cac9348..96a1d877306188a0740b5df190fb682bd51f5c29 100644 (file)
@@ -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])