]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Simplify ceph sha1 saving. No need to round-trip, store N copies.
authorTommi Virtanen <tommi.virtanen@dreamhost.com>
Thu, 9 Jun 2011 23:39:20 +0000 (16:39 -0700)
committerTommi Virtanen <tommi.virtanen@dreamhost.com>
Fri, 10 Jun 2011 00:17:47 +0000 (17:17 -0700)
teuthology/task/ceph.py

index 36d20b0488bfe2fdc73568fdb33d3dee29685ac8..d503723ab4c4cccbbbdef27fe7c69e168592eaab 100644 (file)
@@ -152,21 +152,6 @@ def task(ctx, config):
     teuthology.feed_many_stdins_and_close(conf_fp, writes)
     run.wait(writes)
 
-    version_fp = StringIO()
-    version_fp.write(sha1 + '\n')
-    version_fp.seek(0)
-    writes = ctx.cluster.run(
-        args=[
-            'python',
-            '-c',
-            'import shutil, sys; shutil.copyfileobj(sys.stdin, file(sys.argv[1], "wb"))',
-            '/tmp/cephtest/coverage/ceph_version',
-            ],
-        stdin=run.PIPE,
-        wait=False,
-        )
-    teuthology.feed_many_stdins_and_close(version_fp, writes)
-
     log.info('Setting up mon.0...')
     ctx.cluster.only('mon.0').run(
         args=[
@@ -537,6 +522,9 @@ def task(ctx, config):
         if ctx.archive is not None:
             os.mkdir(ctx.archive)
 
+            with file(os.path.join(ctx.archive, 'ceph-sha1'), 'w') as f:
+                f.write(sha1 + '\n')
+
             log.info('Compressing logs...')
             run.wait(
                 ctx.cluster.run(