]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Don't block on teuthology-results processes
authorZack Cerza <zack@cerza.org>
Wed, 28 May 2014 19:56:59 +0000 (14:56 -0500)
committerZack Cerza <zack@cerza.org>
Wed, 28 May 2014 19:56:59 +0000 (14:56 -0500)
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
teuthology/worker.py

index 5a3f38c4b1ac46b385f5c9c2d8e9c73388e1acdd..8746170f81fc98213b1746f4eac5631ce301550c 100644 (file)
@@ -215,10 +215,10 @@ def main(ctx):
                                (teuthology_branch, teuth_bin_path))
 
         if job_config.get('last_in_suite'):
-            log.info('Generating results email for %s', job_config['name'])
             if teuth_config.results_server:
                 report.try_delete_jobs(job_config['name'],
                                        job_config['job_id'])
+            log.info('Generating results email for %s', job_config['name'])
             args = [
                 os.path.join(teuth_bin_path, 'teuthology-results'),
                 '--timeout',
@@ -230,7 +230,9 @@ def main(ctx):
                 '--name',
                 job_config['name'],
             ]
-            subprocess.Popen(args=args).wait()
+            result_pid = subprocess.Popen(args=args,
+                                          preexec_fn=os.setpgrp,).pid
+            log.debug("teuthology-results PID: %s", result_pid)
         else:
             log.info('Creating archive dir %s', archive_path_full)
             safepath.makedirs(ctx.archive_dir, safe_archive)