]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Create the archive dir earlier, move out of ceph task.
authorTommi Virtanen <tommi.virtanen@dreamhost.com>
Wed, 15 Jun 2011 19:10:27 +0000 (12:10 -0700)
committerTommi Virtanen <tommi.virtanen@dreamhost.com>
Wed, 15 Jun 2011 19:10:27 +0000 (12:10 -0700)
teuthology/run.py
teuthology/task/ceph.py

index 1c983b1e7bcc7c26820115f84dd98f2e2fae3a30..16a0caad9536140bd0c6c2a7be2c694ab3774f90 100644 (file)
@@ -1,4 +1,5 @@
 import argparse
+import os
 import yaml
 
 def config_file(string):
@@ -60,6 +61,12 @@ def main():
         level=loglevel,
         )
 
+    if ctx.archive is not None:
+        os.mkdir(ctx.archive)
+
+        with file(os.path.join(ctx.archive, 'config.yaml'), 'w') as f:
+            yaml.safe_dump(ctx.config, f, default_flow_style=False)
+
     log.debug('\n  '.join(['Config:', ] + yaml.safe_dump(ctx.config, default_flow_style=False).splitlines()))
     log.info('Opening connections...')
 
index 544cc7f817a0243b6229fd2572f1147e078099da..2830d934131fd999cc92a90b550cb86aac07d029 100644 (file)
@@ -520,14 +520,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')
 
-            with file(os.path.join(ctx.archive, 'config.yaml'), 'w') as f:
-                yaml.safe_dump(ctx.config, f, default_flow_style=False)
-
             log.info('Compressing logs...')
             run.wait(
                 ctx.cluster.run(