aurora-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Hrabovcin" <>
Subject Re: Review Request 40922: Thermos: Add ability to forward process output to stdout
Date Mon, 07 Dec 2015 13:17:35 GMT

This is an automatically generated e-mail. To reply, visit:

(Updated Dec. 7, 2015, 1:17 p.m.)

Review request for Aurora.

Bugs: AURORA-1548

Repository: aurora

Description (updated)

This patch will provide way to **optionally** forward process output to stdout and stderr
along with existing file 
destinations. Its main use is to get logs to docker daemon when using Mesos Docker containerizer.

**What was changed:**

New command line option **log_to_std** is added to thermos_executor and thermos_runner. If
thermos_executor gets this option it will pass it down to thermos_runner and runner will pass
it down to **Process** class. New class **Tee** that mimicks behavior of unix tee utility
that allows to split process output to file and stdout is core of this patch. subprocess.Popen
in Process class used be opened with stdout/stderr file parameters. Now it will always get
openend with subprocess.PIPE for stdout/stderr. Output of these pipes is constantly copied
to Tee until process exits. If log_to_std is provided Tee will split output to expected files
and stdout/stderr. Otherwise logs will be split to files and /dev/null.


  src/main/python/apache/aurora/executor/bin/ 0d02dc1 
  src/main/python/apache/aurora/executor/ 14e8b4b 
  src/main/python/apache/thermos/core/ fe95cb3 
  src/main/python/apache/thermos/core/ f949f27 
  src/main/python/apache/thermos/runner/ bd8cf7f 
  src/test/python/apache/thermos/core/ 5e6ad2f 


Testing (updated)

Unit test coverage is provided for new functionality.

I did also manual testing with mesos/docker and I made sure that logs are being written to
expected files and also same output gets to docker daemon.


Martin Hrabovcin

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message