aurora-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Hrabovcin" <mhrabov...@gmail.com>
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:
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 (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.


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 (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.


Thanks,

Martin Hrabovcin


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