]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Fix bug that thought all >1 node clusters always had core dumps.
authorTommi Virtanen <tommi.virtanen@dreamhost.com>
Mon, 20 Jun 2011 20:18:01 +0000 (13:18 -0700)
committerTommi Virtanen <tommi.virtanen@dreamhost.com>
Mon, 20 Jun 2011 21:31:41 +0000 (14:31 -0700)
Accidentally shared the stdout between all the runs.

teuthology/task/internal.py

index 7722ea63eba87b8fdb2a30dd9644e67b2183ba58..aa0b71afb645f1a20a97ceab1172cfe0d2e4ac59 100644 (file)
@@ -171,16 +171,15 @@ def coredump(ctx, config):
 
         # set success=false if the dir is still there = coredumps were
         # seen
-        processes = ctx.cluster.run(
-            args=[
-                'if', 'test', '!', '-e', '/tmp/cephtest/archive/coredump', run.Raw(';'), 'then',
-                'echo', 'OK', run.Raw(';'),
-                'fi',
-                ],
-            wait=False,
-            stdout=StringIO(),
-            )
-        run.wait(processes)
-        if any(r.stdout.getvalue() != 'OK' for r in processes):
-            log.warning('Found coredumps, flagging run as failed.')
-            ctx.summary['success'] = False
+        for remote in ctx.cluster.remotes.iterkeys():
+            r = remote.run(
+                args=[
+                    'if', 'test', '!', '-e', '/tmp/cephtest/archive/coredump', run.Raw(';'), 'then',
+                    'echo', 'OK', run.Raw(';'),
+                    'fi',
+                    ],
+                stdout=StringIO(),
+                )
+            if r.stdout.getvalue() != 'OK\n':
+                log.warning('Found coredumps on %s, flagging run as failed', remote)
+                ctx.summary['success'] = False