-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40922/#review110699
-----------------------------------------------------------

Ship it!


Master (fb8155d) is green with this patch.
  true

I will refresh this build result if you post a review containing "@ReviewBot 
retry"

- John Sirois


On Dec. 7, 2015, 1:17 p.m., Martin Hrabovcin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40922/
> -----------------------------------------------------------
> 
> (Updated Dec. 7, 2015, 1:17 p.m.)
> 
> 
> Review request for Aurora.
> 
> 
> Bugs: AURORA-1548
>     https://issues.apache.org/jira/browse/AURORA-1548
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> 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.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/executor/bin/thermos_executor_main.py 0d02dc1 
>   src/main/python/apache/aurora/executor/thermos_task_runner.py 14e8b4b 
>   src/main/python/apache/thermos/core/process.py fe95cb3 
>   src/main/python/apache/thermos/core/runner.py f949f27 
>   src/main/python/apache/thermos/runner/thermos_runner.py bd8cf7f 
>   src/test/python/apache/thermos/core/test_process.py 5e6ad2f 
> 
> Diff: https://reviews.apache.org/r/40922/diff/
> 
> 
> Testing
> -------
> 
> 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.
> 
> 
> Thanks,
> 
> Martin Hrabovcin
> 
>

Reply via email to