aurora-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Wickman" <wick...@apache.org>
Subject Re: Review Request 30695: Implements log rotation in the Thermos runner.
Date Fri, 06 Feb 2015 18:52:54 GMT

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


This is super rad.  Thanks for taking this on.

Before I do a deeper dive, what do you think about making the logrotate policy be specified
by the user instead of the framework owner, with a sensible default?  For example, if this
is configurable on the process object, you can have different policies per process, e.g.

```py
class RotatePolicy(Struct):
  log_size = Default(Integer, 32*MB)
  backups = Default(Integer, 10)
  copytruncate = Default(Boolean, False)
  compress = Default(Boolean, False)
  hangup_command = String
  ...
    
# union
class Logger(Struct):
  standard = Boolean  # standard i/o
  devnull = Boolean   # /dev/null redirection
  logrotate = RotatePolicy  # use a logrotation policy
    
DefaultLogger = Logger(standard=True)
    
class Process(Struct):
  cmdline = Required(String)
  name    = Required(String)
  ...
  logger  = Default(Logger, DefaultLogger)
```

This also means reduced end-to-end plumbing through all the binaries, class constructors,
etc.  And if you ever need to add new features (e.g. a compress option), they're fairly well
encapsulated within the Logger union.

- Brian Wickman


On Feb. 6, 2015, 5:51 p.m., George Sirois wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30695/
> -----------------------------------------------------------
> 
> (Updated Feb. 6, 2015, 5:51 p.m.)
> 
> 
> Review request for Aurora, Bill Farner and Brian Wickman.
> 
> 
> Bugs: AURORA-95
>     https://issues.apache.org/jira/browse/AURORA-95
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Implements log rotation in the Thermos runner.
> 
> 
> Diffs
> -----
> 
>   docs/deploying-aurora-scheduler.md d1123359961fd59ddb8c1a07f80f293bdd46019f 
>   src/main/python/apache/aurora/executor/bin/thermos_executor_main.py 0752d50015b2ff936f079c4a9f2777172dc00a93

>   src/main/python/apache/aurora/executor/thermos_task_runner.py 9ff8c5379aad7ac011115e44b1f5a2b74f759f26

>   src/main/python/apache/thermos/bin/thermos_runner.py bd8cf7f4cda54b6be72dad64f9446eedeb132211

>   src/main/python/apache/thermos/core/process.py 5ce138dab161d880c0bd58b87a6f5a54d4ca2f99

>   src/main/python/apache/thermos/core/runner.py f949f279a071c6464b026749f51afc776102f2aa

>   src/test/python/apache/thermos/core/test_process.py e261249b977802851ffc3d89437761c532fcd3f8

> 
> Diff: https://reviews.apache.org/r/30695/diff/
> 
> 
> Testing
> -------
> 
> ./pants test src/test/python/apache/thermos/core:all
> 
> 
> Thanks,
> 
> George Sirois
> 
>


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