]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
Workers: only log child's stderr, not stdout 61/head
authorZack Cerza <zack@cerza.org>
Thu, 29 Aug 2013 21:12:36 +0000 (16:12 -0500)
committerZack Cerza <zack@cerza.org>
Thu, 29 Aug 2013 21:12:36 +0000 (16:12 -0500)
teuthology/queue.py

index 36dced4e468c363401e5a628407fa3348d9c9ec9..c31724a2eb85b1ae3c01394108259c7e0ff943e5 100644 (file)
@@ -201,32 +201,29 @@ def run_job(job_config, archive_path, teuth_bin_path):
         arg.append('-v')
 
     arg.extend([
-            '--lock',
-            '--block',
-            '--owner', job_config['owner'],
-            '--archive', archive_path,
-            '--name', job_config['name'],
-            ])
+        '--lock',
+        '--block',
+        '--owner', job_config['owner'],
+        '--archive', archive_path,
+        '--name', job_config['name'],
+    ])
     if job_config['description'] is not None:
         arg.extend(['--description', job_config['description']])
     arg.append('--')
 
-    with tempfile.NamedTemporaryFile(
-        prefix='teuthology-worker.',
-        suffix='.tmp',
-        ) as tmp:
+    with tempfile.NamedTemporaryFile(prefix='teuthology-worker.',
+                                     suffix='.tmp',) as tmp:
         yaml.safe_dump(data=job_config['config'], stream=tmp)
         tmp.flush()
         arg.append(tmp.name)
         p = subprocess.Popen(
             args=arg,
             close_fds=True,
-            stdout=subprocess.PIPE,
             stderr=subprocess.STDOUT,
-            )
+        )
         child = logging.getLogger(__name__ + '.child')
-        for line in p.stdout:
-            child.info(': %s', line.rstrip('\n'))
+        for line in p.stderr:
+            child.error(': %s', line.rstrip('\n'))
         p.wait()
         if p.returncode != 0:
             log.error('Child exited with code %d', p.returncode)