]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
run: write info.yaml on job start
authorSage Weil <sage@inktank.com>
Thu, 29 Aug 2013 18:46:38 +0000 (11:46 -0700)
committerZack Cerza <zack@cerza.org>
Thu, 29 Aug 2013 20:04:50 +0000 (15:04 -0500)
Include basic metadata bout the job.

Signed-off-by: Sage Weil <sage@inktank.com>
teuthology/run.py

index 5ac0eaa796c3e64c35d2b8e22b6c7d98cefd3565..f3e44abae9f25e1953269c2fcf597638269805c5 100644 (file)
@@ -130,6 +130,14 @@ def main():
         ctx.owner = get_user()
 
     write_initial_metadata(ctx)
+    if ctx.archive is not None:
+        info = {}
+        info['pid'] = os.getpid();
+        info['description'] = ctx.description;
+        info['run'] = ctx.name;
+        info['owner'] = ctx.owner;
+        with file(os.path.join(ctx.archive, 'info.yaml'), 'w') as f:
+            yaml.safe_dump(info, f, default_flow_style=False)
 
     log.debug('test')
     raise RuntimeError('hi there')