]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
dispatcher: Keep job output out of stdout/err
authorZack Cerza <zack@redhat.com>
Mon, 20 Feb 2023 19:40:14 +0000 (12:40 -0700)
committerZack Cerza <zack@redhat.com>
Mon, 20 Feb 2023 20:08:03 +0000 (13:08 -0700)
If we want the dispatcher to run under systemd, let's keep its output a
bit more terse. The logfile will still be available.

Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/dispatcher/__init__.py

index ae5936c4c4e06e6dbfaf3d46e878901b3d0ff0c5..6684d67d2978bda9489d154f5ee1289046c11485 100644 (file)
@@ -181,7 +181,11 @@ def main(args):
         run_args.extend(["--job-config", job_config_path])
 
         try:
-            job_proc = subprocess.Popen(run_args)
+            job_proc = subprocess.Popen(
+                run_args,
+                stdout=subprocess.DEVNULL,
+                stdin=subprocess.STDOUT,
+            )
             job_procs.add(job_proc)
             log.info('Job supervisor PID: %s', job_proc.pid)
         except Exception: