From 2bae22f0a375110ef17fd769c37dd8feb9a6c36c Mon Sep 17 00:00:00 2001 From: Tommi Virtanen Date: Wed, 15 Jun 2011 12:10:27 -0700 Subject: [PATCH] Create the archive dir earlier, move out of ceph task. --- teuthology/run.py | 7 +++++++ teuthology/task/ceph.py | 5 ----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/teuthology/run.py b/teuthology/run.py index 1c983b1e7bcc7..16a0caad95361 100644 --- a/teuthology/run.py +++ b/teuthology/run.py @@ -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...') diff --git a/teuthology/task/ceph.py b/teuthology/task/ceph.py index 544cc7f817a02..2830d934131fd 100644 --- a/teuthology/task/ceph.py +++ b/teuthology/task/ceph.py @@ -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( -- 2.39.5